 package CurtainDesign;

 import CurtainDesign.utils.CalculateUtils;
 import CurtainDesign.utils.CurtainChecker;
 import CurtainDesign.utils.DividerPosInputDlg;
 import CurtainDesign.utils.HingeRelatedInfo;
 import CurtainDesign.utils.TPoleInputDialog;
 import com.sun.jimi.core.Jimi;
 import com.sun.jimi.core.component.JimiCanvasLW;
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.FlowLayout;
 import java.awt.Font;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Image;
 import java.awt.Insets;
 import java.awt.MediaTracker;
 import java.awt.SystemColor;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.WindowEvent;
 import java.awt.event.WindowListener;
 import java.io.File;
 import java.text.DecimalFormat;
 import java.util.Vector;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JDialog;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextArea;
 import javax.swing.JTextField;
 import javax.swing.border.BevelBorder;
 import javax.swing.border.Border;
 import javax.swing.border.LineBorder;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.event.TableModelEvent;
 import javax.swing.event.TableModelListener;
 import javax.swing.table.TableColumn;
 import javax.swing.table.TableColumnModel;
 import pv.jfcx.JPVTable;
 import pv.jfcx.JPVTableView;
 import pv.jfcx.PVTableEditorListener;
 import pv.jfcx.PVTableModel;

 public class OrderInfoRectSimpleView extends OrderInfoView
 {
   protected JDialog m_DividerPosDlg;
   protected JDialog m_TPolePosDlg;
   protected JDialog m_TotalAreaDlg;

   // 木材选择
   protected JComboBox m_WoodOptions = new JComboBox();

   // 窗户编号
   protected JTextField m_WindowIndex = new JTextField("");

   // 窗户总数
   protected JComboBox m_WindowNum = new JComboBox();

   // 房间
   protected JTextField m_Room = new JTextField("");

   // 窗户扇数
   protected JComboBox m_PanelNum = new JComboBox();

   // 外框数量和位置
   protected JComboBox m_FrameNumPos = new JComboBox();

   // 外框类型
   protected JComboBox m_FrameType = new JComboBox();

   // 安装方式
   protected JComboBox m_Install = new JComboBox();

   protected JComboBox m_FrameWidthNum = new JComboBox();

   protected JComboBox m_FrameHeightNum = new JComboBox();

   // 立杆数量
   protected JComboBox m_PoleNum = new JComboBox();

   // 对口立杆数量
   protected JComboBox m_DuiKouPoleNum = new JComboBox();

   // 分隔梁规格
   protected JComboBox m_DividerType = new JComboBox();

   // 水平间隙
   protected JTextField m_Gap = new JTextField("");

   // 分隔梁数量
   protected JComboBox m_DividerNum = new JComboBox();

   // 分隔梁位置
   protected JTextField m_DividerPos = new JTextField("");

   // T型立杆数量
   protected JComboBox m_TPoleNum = new JComboBox();

   protected JTextField m_TPolePos = new JTextField("");

   // 叶片规格
   protected JComboBox m_VaneType = new JComboBox();

   // 拉杆类型
   protected JComboBox m_PullBarType = new JComboBox();

   // 层数
   protected JComboBox m_Level = new JComboBox();

   // 评论
   protected JTextArea m_Comments = new JTextArea("");
   protected JPVTableView m_CommentsView;
   protected PVTableModel m_CommentsTableModel;
   protected JPVTable m_CommentsTable;
   // 有横T
   protected JCheckBox is_HT_Pole = new JCheckBox("有横T");

   // 两层等高
   protected JCheckBox is_Same_Height = new JCheckBox("两层等高");

   protected JLabel l_HTPole_Pos = new JLabel("分隔线高度");

   // 分隔线高度
   protected JTextField txt_HTPole_Pos = new JTextField("");

   // 窗户等宽
   protected JCheckBox is_Same_Width = new JCheckBox("窗户等宽");

   protected JLabel l_TPole_Pose = new JLabel("T型立杆位置(mm)");

   // T型立杆位置
   protected JTextField txt_TPole_Pose = new JTextField("");

   protected JLabel l_BendHinge_Num = new JLabel("弯曲合页扇数");

   // 弯曲合页扇数
   protected JComboBox cb_BendHingePanel_Num = new JComboBox();

   // 实木
   protected JCheckBox is_Bord = new JCheckBox("实木");

   // 自动添加分隔梁
   protected JCheckBox is_AutoDivider = new JCheckBox("自动添加分隔梁");

   protected JLabel l_TPoleType = new JLabel("T型立杆类型");

   // 双连立杆数
   protected JComboBox cb_ShuangLianPoleNum = new JComboBox();

   // T型立杆类型
   protected JComboBox cb_TPoleType = new JComboBox();

   // 磁碰类型
   protected JComboBox cb_Magnet = new JComboBox();

   protected JTabbedPane doubleWinPane = new JTabbedPane();

   protected JPanel bottom_WinPanel = new JPanel();

   // 合页安装方式（下层）
   protected JComboBox m_Bottom_HingeInstallType = new JComboBox();

   // 窗户扇数 (下层)
   protected JComboBox m_Bottom_PanelNum = new JComboBox();

   // 单开合页扇数（下层）
   protected JComboBox m_Bottom_SingleHinge = new JComboBox();

   // 双开合页扇数（下层）
   protected JComboBox m_Bottom_DoubleHinge = new JComboBox();

   // 立杆数量（下层）
   protected JComboBox m_Bottom_PoleNum = new JComboBox();

   // 对口立杆数量（下层）
   protected JComboBox m_Bottom_DuiKouPoleNum = new JComboBox();

   // T型立杆数量（下层）
   protected JComboBox m_Bottom_TPoleNum = new JComboBox();

   // 双连立杆数量（下层）
   protected JComboBox cb_Bottom_ShuangLianPoleNum = new JComboBox();

   // 水平间隙（下层）
   protected JTextField m_Bottom_Gap = new JTextField("");

   // 叶片规格(下层)
   protected JComboBox m_Bottom_VaneType = new JComboBox();

   protected JComboBox m_Bottom_DividerType = new JComboBox();

   // 分隔梁数量(下层)
   protected JComboBox m_Bottom_DividerNum = new JComboBox();

   // 分隔梁位置(下层)
   protected JTextField m_Bottom_DividerPos = new JTextField("");

   protected JCheckBox is_Bottom_Same_Width = new JCheckBox("窗户等宽");

   // 弯曲合页扇数（下层）
   protected JComboBox cb_Bottom_BendHingePanel_Num = new JComboBox();

   // 实木（下层）
   protected JCheckBox is_Bottom_Bord = new JCheckBox("实木");

   // T型立杆位置（下层）
   protected JTextField txt_Bottom_TPole_Pose = new JTextField("");

   public OrderInfoRectSimpleView()
   {
     try
     {
       jbInit();
     } catch (Exception e) {
       e.printStackTrace();
     }
   }

   public void jbInit()
   {
     this.m_JLabel = new JLabel[37];
     for (int i = 0; i < 37; i++) {
       this.m_JLabel[i] = new JLabel();
     }
     // 初始化数据
     InitData();
     InitGenPaneLayout();
     InitWindowPaneLayout();
     InitPanelPaneLayout();
     InitBottomPanelPaneLayout();
     InitCommentPaneLayout();
     InitShapePicPaneLayout();
     InitListener();
     setLayout(new BorderLayout());
     this.m_Pane.setFont(new Font("Dialog", 0, 12));
     this.m_Pane.add("普通方形一般信息", this.m_GenInfoPane);
     this.m_Pane.add("窗户及外框信息", this.m_WindowInfoPane);
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2"))
     {
       this.m_Pane.remove(this.m_PanelPane);
       this.m_Pane.remove(this.m_CommentPane);
       this.m_Pane.remove(this.m_ShapePicPane);
       this.doubleWinPane.setFont(new Font("Dialog", 0, 12));
       this.doubleWinPane.add("上层窗扇信息", this.m_PanelPane);
       this.doubleWinPane.add("下层窗扇信息", this.bottom_WinPanel);
       this.m_Pane.add("扇信息", this.doubleWinPane);
       this.m_Pane.add("备注", this.m_CommentPane);
       this.m_Pane.add("大致外形预览", this.m_ShapePicPane);
       add(this.m_Pane, "Center");
     }
     else
     {
       this.m_Pane.remove(this.doubleWinPane);
       this.m_Pane.remove(this.m_CommentPane);
       this.m_Pane.remove(this.m_ShapePicPane);
       this.m_Pane.add("扇信息", this.m_PanelPane);
       this.m_Pane.add("备注", this.m_CommentPane);
       this.m_Pane.add("大致外形预览", this.m_ShapePicPane);
       add(this.m_Pane, "Center");
     }
   }

   public void InitData()
   {
     Vector temp = new Vector();

     for (int i = 0; i < Constants.CLIENTREGION.length; i++) {
       temp.add(Constants.CLIENTREGION[i]);
       this.m_ClientRegion.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.COLOR.length; i++) {
       temp.add(Constants.COLOR[i]);
       this.m_Color.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.HINGECOLOR.length; i++) {
       temp.add(Constants.HINGECOLOR[i]);
       this.m_HingeColor.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i < Constants.WOODOPTION.length; i++) {
       temp.add(Constants.WOODOPTION[i]);
       this.m_WoodOptions.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i <= 12; i++) {
       temp.add("" + i);
       this.cb_BendHingePanel_Num.addItem(temp.elementAt(i));
       this.cb_Bottom_BendHingePanel_Num.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i <= 12; i++) {
       temp.add("" + i);
       this.m_SingleHinge.addItem(temp.elementAt(i));
       this.m_Bottom_SingleHinge.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i <= 12; i++) {
       temp.add("" + i);
       this.m_DoubleHinge.addItem(temp.elementAt(i));
       this.m_Bottom_DoubleHinge.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 100; i++) {
       temp.add(i + 1 + "");
       this.m_WindowNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 12; i++) {
       temp.add(i + 1 + "");
       this.m_PanelNum.addItem(temp.elementAt(i));
       this.m_Bottom_PanelNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.FRAMETYPE.length; i++) {
       temp.add(Constants.FRAMETYPE[i]);
       this.m_FrameType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.FRAMENUMPOS.length; i++) {
       temp.add(Constants.FRAMENUMPOS[i]);
       this.m_FrameNumPos.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.HINGE_TYPES.length; i++) {
       temp.add(Constants.HINGE_TYPES[i]);
       this.m_HingeInstallType.addItem(temp.elementAt(i));
       this.m_Bottom_HingeInstallType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.INSTALL.length; i++) {
       temp.add(Constants.INSTALL[i]);
       this.m_Install.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i < Constants.FRAMEWIDTHNUM.length; i++) {
       temp.add(Constants.FRAMEWIDTHNUM[i]);
       this.m_FrameWidthNum.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i < Constants.FRAMEHEIGHTNUM.length; i++) {
       temp.add(Constants.FRAMEHEIGHTNUM[i]);
       this.m_FrameHeightNum.addItem(temp.elementAt(i));
     }
     temp.removeAllElements();
     for (int i = 0; i < 24; i++) {
       temp.add(i + 1 + "");
       this.m_PoleNum.addItem(temp.elementAt(i));
       this.m_Bottom_PoleNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 25; i++) {
       temp.add(i + "");
       this.m_DuiKouPoleNum.addItem(temp.elementAt(i));
       this.m_Bottom_DuiKouPoleNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 25; i++) {
       temp.add(i + "");
       this.cb_ShuangLianPoleNum.addItem(temp.elementAt(i));
       this.cb_Bottom_ShuangLianPoleNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.VANETYPE.length; i++) {
       temp.add(Constants.VANETYPE[i]);
       this.m_VaneType.addItem(temp.elementAt(i));
       this.m_Bottom_VaneType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.PULLBARTYPE.length; i++) {
       temp.add(Constants.PULLBARTYPE[i]);
       this.m_PullBarType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 4; i++) {
       temp.add(i + "");
       this.m_DividerNum.addItem(temp.elementAt(i));
       this.m_Bottom_DividerNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < Constants.DIVIDERTYPE.length; i++) {
       temp.add(Constants.DIVIDERTYPE[i]);
       this.m_DividerType.addItem(temp.elementAt(i));
       this.m_Bottom_DividerType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     for (int i = 0; i < 12; i++) {
       temp.add(i + "");
       this.m_TPoleNum.addItem(temp.elementAt(i));
       this.m_Bottom_TPoleNum.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     temp.add("1");
     temp.add("2");
     this.m_Level.addItem(temp.elementAt(0));
     this.m_Level.addItem(temp.elementAt(1));

     CurtainDesign.m_PipeIndexFile.CreatePipeIndexFile(Constants.STYLES[0]);

     temp.removeAllElements();
     int i = 0;
     for (int j = Constants.T_POLE_TYPE.length; i < j; i++)
     {
       temp.add(Constants.T_POLE_TYPE[i]);
       this.cb_TPoleType.addItem(temp.elementAt(i));
     }

     temp.removeAllElements();
     int i1 = 0;
     for (int j = Constants.MAGNET_TYPE.length; i1 < j; i1++)
     {
       temp.add(Constants.MAGNET_TYPE[i1]);
       this.cb_Magnet.addItem(temp.elementAt(i1));
     }
   }

   public void InitListener()
   {
     initGenTabListener();
     initWinInfoTabListener();
     initPaneTabCompListener();
     initBottomPaneTabCompListener();

     this.m_Comments.addMouseListener(new MouseListener() {
       public void mouseClicked(MouseEvent e) {
         ((JTextArea)e.getSource()).setText("");
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void mouseEntered(MouseEvent e)
       {
       }

       public void mouseExited(MouseEvent e)
       {
       }

       public void mousePressed(MouseEvent e)
       {
       }

       public void mouseReleased(MouseEvent e)
       {
       }
     });
     this.m_Comments.addKeyListener(new KeyListener() {
       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveComments(((JTextArea)e.getSource()).getText());

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
   }

   private void initGenTabListener()
   {
   	// 订单编号
     this.m_OrderIndex.addKeyListener(new KeyListener()
     {
       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_OrderIndex.getText();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOrderIndex(str);
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     // 客户名称
     this.m_ClientRegion.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveClientRegion((String)b.getSelectedItem());
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         if (((String)b.getSelectedItem()).equals(Constants.CLIENTREGION[0]))
         {
           OrderInfoRectSimpleView.this.cb_Magnet.setSelectedItem(Constants.MAGNET_TYPE[0]);
           MainView.m_OrderInfo.SaveIsRoundMagnet(true);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 房间
     this.m_Room.addKeyListener(new KeyListener() {
       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_Room.getText();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveRoom(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     this.m_PipeIndex.addKeyListener(new KeyListener() {
       Pattern numpattern = Pattern.compile("\\d*");

       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_PipeIndex.getText();
         Matcher m = this.numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_PipeIndex.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePipeIndex(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     // 客户参考号
     this.m_CustRefNum.addKeyListener(new KeyListener()
     {
       public void keyPressed(KeyEvent arg0) {
       }

       public void keyReleased(KeyEvent arg0) {
         String custRefNum = OrderInfoRectSimpleView.this.m_CustRefNum.getText();
         if ((null == custRefNum) && (custRefNum.trim().length() == 0))
         {
           custRefNum = "";
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveCustRefNum(custRefNum);
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyTyped(KeyEvent arg0)
       {
       }
     });
   }

   private void initWinInfoTabListener()
   {
   	// 窗户总数
     this.m_WindowNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         if (OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem() == null)
         {
           return;
         }
         if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOtherHeight().equals("")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOtherWidth().equals("")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWindowNum().equals("")))
         {
           JOptionPane.showMessageDialog(CurtainDesign.m_UserMainGUI, "请注意,这将丢失已输入的其它窗户尺寸!");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOtherHeight("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOtherWidth("");
         }
         if (((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals(""))
         {
           return;
         }
         if (((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals("1"))
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum((String)b.getSelectedItem());
         }
         else if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().equals(""))
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum((String)b.getSelectedItem());
           return;
         }

         Integer tmp1 = new Integer((String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem());
         if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim().equals(""))
         {
           return;
         }
         Integer tmp2 = new Integer(OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim());
         if (tmp1.compareTo(tmp2) < 0)
         {
           JOptionPane.showMessageDialog(null, "窗户总数不得小于窗户编号", "错误", 0);
           OrderInfoRectSimpleView.this.m_WindowNum.setSelectedIndex(-1);
           OrderInfoRectSimpleView.this.m_WindowIndex.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowIndex("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum("");
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum((String)b.getSelectedItem());

         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 窗户编号
     this.m_WindowIndex.addKeyListener(new KeyListener() {
       Pattern numpattern = Pattern.compile("\\d*");

       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_WindowIndex.getText();
         Matcher m = this.numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_WindowIndex.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowIndex(str);
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     this.m_WindowIndex.addFocusListener(new FocusListener() {
       public void focusGained(FocusEvent e) {
       }

       public void focusLost(FocusEvent e) {
         if (OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem() == null) {
           return;
         }
         if ((!((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals("")) && (!((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals("1")))
         {
           if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().equals("")) {
             return;
           }
         }
         Integer tmp1 = new Integer((String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem());

         if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim().equals("")) {
           return;
         }

         Integer tmp2 = new Integer(OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim());

         if (tmp1.compareTo(tmp2) < 0) {
           JOptionPane.showMessageDialog(null, "窗户总数不得小于窗户编号", "错误", 0);

           OrderInfoRectSimpleView.this.m_WindowNum.setSelectedIndex(-1);
           OrderInfoRectSimpleView.this.m_WindowIndex.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowIndex("");

           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum("");
         }

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     this.m_WindowIndex.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
         if (OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem() == null) {
           return;
         }
         if ((!((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals("")) && (!((String)(String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem()).equals("1")))
         {
           if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().equals("")) {
             return;
           }
         }
         Integer tmp1 = new Integer((String)OrderInfoRectSimpleView.this.m_WindowNum.getSelectedItem());

         if (OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim().equals("")) {
           return;
         }

         Integer tmp2 = new Integer(OrderInfoRectSimpleView.this.m_WindowIndex.getText().trim());

         if (tmp1.compareTo(tmp2) < 0) {
           JOptionPane.showMessageDialog(null, "窗户总数不得小于窗户编号", "错误", 0);

           OrderInfoRectSimpleView.this.m_WindowNum.setSelectedIndex(-1);
           OrderInfoRectSimpleView.this.m_WindowIndex.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowIndex("");

           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWindowNum("");
         }

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 木材选择
     this.m_WoodOptions.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveWoodOption(b.getSelectedIndex());

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 颜色
     this.m_Color.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveColor((String)b.getSelectedItem());
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 窗户宽度
     this.m_OriWindowWidth.addKeyListener(new KeyListener() {
       Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_OriWindowWidth.getText();
         Matcher m = this.numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_OriWindowWidth.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOriWindowWidth(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     this.m_OriWindowHeight.addKeyListener(new KeyListener() {
       Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_OriWindowHeight.getText();
         Matcher m = this.numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_OriWindowHeight.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOriWindowHeight(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     // 安装方式
     this.m_Install.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveInstall((String)b.getSelectedItem());
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 合页颜色
     this.m_HingeColor.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveHingeColor(b.getSelectedIndex());
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 外框数量和位置
     this.m_FrameNumPos.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameNumPos(b.getSelectedIndex());
         if (((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameType() == 4) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameType() == 10)) && (b.getSelectedIndex() == 1))
         {
           JOptionPane.showMessageDialog(null, "L型框不能切底!", "错误", 0);
           OrderInfoRectSimpleView.this.m_FrameNumPos.setSelectedIndex(-1);
           return;
         }
         if (null != b.getSelectedItem()) {
           if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[0])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(2);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[1])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(2);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[2])) {
             OrderInfoRectSimpleView.this.m_FrameType.setSelectedIndex(-1);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameType(-1);
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(false);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(0);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[3])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(1);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[4])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(1);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[5])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(1);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[6])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(1);
           }
           else if (b.getSelectedItem().equals(Constants.FRAMENUMPOS[7])) {
             OrderInfoRectSimpleView.this.m_FrameType.setEnabled(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
           }
           OrderInfoRectSimpleView.this.CheckCalcBt();
         }
       }
     });
     // 外框类型
     this.m_FrameType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         if (((b.getSelectedIndex() == 4) || (b.getSelectedIndex() == 10)) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameNumPos() == 1))
         {
           JOptionPane.showMessageDialog(null, "L型框不能切底!", "错误", 0);
           OrderInfoRectSimpleView.this.m_FrameType.setSelectedIndex(-1);
           return;
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameType(b.getSelectedIndex());
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 拉杆类型
     this.m_PullBarType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePullBarType(b.getSelectedIndex());
         if ((OrderInfoRectSimpleView.this.m_VaneType.getSelectedIndex() == 4) && (OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex() == 1))
         {
           OrderInfoRectSimpleView.this.m_VaneType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(OrderInfoRectSimpleView.this.m_VaneType.getSelectedIndex());

           OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePullBarType(OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex());

           JOptionPane.showMessageDialog(null, "31mm不能选择隐式拉杆", "错误", 0);
         }

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
	 // 磁碰类型
     this.cb_Magnet.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         if (((String)OrderInfoRectSimpleView.this.cb_Magnet.getSelectedItem()).equalsIgnoreCase(Constants.MAGNET_TYPE[0]))
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveIsRoundMagnet(true); // 圆磁碰 设置为true
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveIsRoundMagnet(false); // 方磁碰 设置为false
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     this.is_AutoDivider.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent arg0) {
         if (OrderInfoRectSimpleView.this.is_AutoDivider.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveAutoAddDivider(true);
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveAutoAddDivider(false);
         }
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // T型立杆类型
     this.cb_TPoleType.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         String tPoleType = (String)b.getSelectedItem();
         if (CurtainChecker.isEmpty(tPoleType))
         {
           tPoleType = "";
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveTPoleType(tPoleType);
         CurtainDesign.m_UserMainGUI.DisableSaveBt();
         CurtainDesign.m_UserMainGUI.EnableSaveAsBt();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 层数
     this.m_Level.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveLevel(str);
         // 2层的情况
         if (str.trim().equals("2"))
         {
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.m_PanelPane);
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.m_CommentPane);
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.m_ShapePicPane);
           OrderInfoRectSimpleView.this.doubleWinPane.setFont(new Font("Dialog", 0, 12));
           OrderInfoRectSimpleView.this.doubleWinPane.add("上层窗扇信息", OrderInfoRectSimpleView.this.m_PanelPane);
           OrderInfoRectSimpleView.this.doubleWinPane.add("下层窗扇信息", OrderInfoRectSimpleView.this.bottom_WinPanel);
           OrderInfoRectSimpleView.this.m_Pane.add("扇信息", OrderInfoRectSimpleView.this.doubleWinPane);
           OrderInfoRectSimpleView.this.m_Pane.add("备注", OrderInfoRectSimpleView.this.m_CommentPane);
           OrderInfoRectSimpleView.this.m_Pane.add("大致外形预览", OrderInfoRectSimpleView.this.m_ShapePicPane);
           OrderInfoRectSimpleView.this.is_Same_Height.setEnabled(true);
           OrderInfoRectSimpleView.this.is_Same_Height.setSelected(true);
           OrderInfoRectSimpleView.this.is_HT_Pole.setEnabled(true);
           OrderInfoRectSimpleView.this.is_HT_Pole.setSelected(false);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setEnabled(false);
           // 实木 && 底层实木
           if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard()))
           {
             OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
             OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(false);
             // 设置拉杆类型为-1
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePullBarType(-1);
           }
           else
           {
             OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(true);
           }

           if (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist())
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(false);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(false);
             OrderInfoRectSimpleView.this.m_Bottom_HingeInstallType.setEnabled(false);

             if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos()))
             {
               OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
               CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
             }
           }
           else
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(true);
             OrderInfoRectSimpleView.this.m_Bottom_HingeInstallType.setEnabled(true);
           }
         }
         else
         {
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.doubleWinPane);
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.m_CommentPane);
           OrderInfoRectSimpleView.this.m_Pane.remove(OrderInfoRectSimpleView.this.m_ShapePicPane);
           OrderInfoRectSimpleView.this.m_Pane.add("扇信息", OrderInfoRectSimpleView.this.m_PanelPane);
           OrderInfoRectSimpleView.this.m_Pane.add("备注", OrderInfoRectSimpleView.this.m_CommentPane);
           OrderInfoRectSimpleView.this.m_Pane.add("大致外形预览", OrderInfoRectSimpleView.this.m_ShapePicPane);
           OrderInfoRectSimpleView.this.is_Same_Height.setEnabled(false);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSameHeight(false);
           OrderInfoRectSimpleView.this.is_HT_Pole.setEnabled(false);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHTPoleExist(false);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setEnabled(false);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHtPolePos("");
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 两层等高
     this.is_Same_Height.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent e)
       {
         if (OrderInfoRectSimpleView.this.is_Same_Height.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSameHeight(true);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setEnabled(false);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHtPolePos("");
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSameHeight(false);
           OrderInfoRectSimpleView.this.txt_HTPole_Pos.setEnabled(true);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 有横T
     this.is_HT_Pole.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent e)
       {
         if (OrderInfoRectSimpleView.this.is_HT_Pole.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHTPoleExist(true);
           OrderInfoRectSimpleView.this.l_HTPole_Pos.setText("横T高度");

           OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(true);
           OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(true);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(true);
           OrderInfoRectSimpleView.this.m_Bottom_HingeInstallType.setEnabled(true);
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHTPoleExist(false);
           OrderInfoRectSimpleView.this.l_HTPole_Pos.setText("分隔线高度");

           OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(false);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(false);

           if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos()))
           {
             OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
           }
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 分隔线高度
     this.txt_HTPole_Pos.addKeyListener(new KeyListener() {
       public void keyPressed(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String pos = OrderInfoRectSimpleView.this.txt_HTPole_Pos.getText();
         if (!CurtainChecker.isEmpty(pos))
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveHtPolePos(pos);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyTyped(KeyEvent e)
       {
       }
     });
   }

   private void initPaneTabCompListener()
   {
   	// 窗户等宽
     this.is_Same_Width.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent e) {
         if (OrderInfoRectSimpleView.this.is_Same_Width.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSamePanelWidth(true);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveTPolePos("");
           OrderInfoRectSimpleView.this.txt_TPole_Pose.setText("");
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSamePanelWidth(false);
         }
         if ((!OrderInfoRectSimpleView.this.is_HT_Pole.isSelected()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")))
         {
           OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(OrderInfoRectSimpleView.this.is_Same_Width.isSelected());
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 实木
     this.is_Bord.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent e) {
         if (OrderInfoRectSimpleView.this.is_Bord.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveIsBoard(true);

           OrderInfoRectSimpleView.this.m_VaneType.setEnabled(false); // 叶片规格不能选
           OrderInfoRectSimpleView.this.m_VaneType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(-1);

           OrderInfoRectSimpleView.this.m_DividerType.setEnabled(false); // 分隔梁规格不能选
           OrderInfoRectSimpleView.this.m_DividerType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(-1);

           OrderInfoRectSimpleView.this.m_DividerNum.setEnabled(false); // 分隔梁数量不能选
           OrderInfoRectSimpleView.this.m_DividerNum.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerNum("");

           OrderInfoRectSimpleView.this.m_DividerPos.setEnabled(false); // 分隔梁位置不能选
           OrderInfoRectSimpleView.this.m_DividerPos.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos("");

           if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("1"))
           {
             OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
             OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(false);
           }
           else if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard()))
           {
             OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
             OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(false);
           }
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveIsBoard(false);
           OrderInfoRectSimpleView.this.m_VaneType.setEnabled(true);
           OrderInfoRectSimpleView.this.m_DividerNum.setEnabled(true);
           OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(true);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // T型立杆位置
     this.txt_TPole_Pose.addMouseListener(new MouseListener() {
       public void mouseClicked(MouseEvent e) {
         String tPoleNum = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum();
         if ((!CurtainChecker.isEmpty(tPoleNum)) && (CurtainChecker.isInteger(tPoleNum)) && (new Integer(tPoleNum).intValue() > 0) && (!OrderInfoRectSimpleView.this.is_Same_Width.isSelected()))
         {
           int num = new Integer(tPoleNum).intValue();
           TPoleInputDialog dlg = new TPoleInputDialog(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.txt_TPole_Pose, num, 1);
           dlg.show();
         }

         // 有横T && 第二层
         if ((!OrderInfoRectSimpleView.this.is_HT_Pole.isSelected()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")))
         {
           if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos()))
           {
             OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
           }
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
         }

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void mouseEntered(MouseEvent e)
       {
       }

       public void mouseExited(MouseEvent e)
       {
       }

       public void mousePressed(MouseEvent e)
       {
       }

       public void mouseReleased(MouseEvent e)
       {
       }
     });
     this.cb_BendHingePanel_Num.setEditable(true);
     // 弯曲合页扇数
     this.cb_BendHingePanel_Num.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String num = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(num))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           num = "";
           b.setSelectedItem(num);
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBendHinge(num);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 合页安装方式
     this.m_HingeInstallType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox cb = (JComboBox)e.getSource();
         String hingeInstall = (String)cb.getSelectedItem();

         if ((CurtainChecker.isEmpty(hingeInstall)) && (e.getStateChange() != 1))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请输入或者选择合页安装方式！", "错误", 0);
           OrderInfoRectSimpleView.this.cb_BendHingePanel_Num.setSelectedItem("");
           OrderInfoRectSimpleView.this.txt_TPole_Pose.setText("");
           OrderInfoRectSimpleView.this.cb_ShuangLianPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_SingleHinge.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_DoubleHinge.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_PanelNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_PoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_DuiKouPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_TPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Gap.setText("");
           OrderInfoRectSimpleView.this.CheckCalcBt();
           return;
         }

         String[] tempArray = hingeInstall.split(":");
         if (tempArray.length == 2)
         {
           hingeInstall = tempArray[1];
         }

         if (e.getStateChange() == 2L)
         {
           hingeInstall = CalculateUtils.formatHingeInstallType(hingeInstall);
           if (!CurtainChecker.isVaildHingeInstall(hingeInstall, CurtainChecker.simpleRectRegex))
           {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             JOptionPane.showMessageDialog(null, "您输入的合页安装方式不合法！", "错误", 0);
             OrderInfoRectSimpleView.this.cb_BendHingePanel_Num.setSelectedItem("");
             OrderInfoRectSimpleView.this.txt_TPole_Pose.setText("");
             OrderInfoRectSimpleView.this.cb_ShuangLianPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_SingleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_DoubleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_PanelNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_PoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_DuiKouPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_TPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Gap.setText("");
             OrderInfoRectSimpleView.this.CheckCalcBt();
             return;
           }

           // 获得合页相关信息
           HingeRelatedInfo info = CalculateUtils.getSimpleRectHingeRelatedInfo(hingeInstall);
           if ((info.getTPoleNum() > 0) && ((OrderInfoRectSimpleView.this.cb_TPoleType.getSelectedIndex() == -1) || (OrderInfoRectSimpleView.this.cb_TPoleType.getSelectedIndex() == 3)))
           {
             cb.setSelectedIndex(-1);
             return;
           }

           // T型立杆数量为0时 窗户等宽复选框 选中 置灰
           if (info.getTPoleNum() == 0)
           {
             OrderInfoRectSimpleView.this.is_Same_Width.setSelected(true);
             OrderInfoRectSimpleView.this.is_Same_Width.setEnabled(false);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveSamePanelWidth(true);
           }
           else
           {
             OrderInfoRectSimpleView.this.is_Same_Width.setEnabled(true);
           }

           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveHingeInstallType(hingeInstall);

           OrderInfoRectSimpleView.this.m_PanelNum.setSelectedIndex(info.getPaneNum() - 1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePanelNum(new Integer(info.getPaneNum()).toString());

           OrderInfoRectSimpleView.this.cb_BendHingePanel_Num.setSelectedIndex(info.getBendHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBendHinge(new Integer(info.getBendHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_SingleHinge.setSelectedIndex(info.getSingleHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveSingleHinge(new Integer(info.getSingleHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_DoubleHinge.setSelectedIndex(info.getDoubleHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDoubleHinge(new Integer(info.getDoubleHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_PoleNum.setSelectedIndex(info.getPoleNum() - 1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePoleNum(new Integer(info.getPoleNum()).toString());

           OrderInfoRectSimpleView.this.m_DuiKouPoleNum.setSelectedIndex(info.getDuikouPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDuiKouPoleNum(new Integer(info.getDuikouPoleNum()).toString());

           OrderInfoRectSimpleView.this.cb_ShuangLianPoleNum.setSelectedIndex(info.getShuanglianPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveShuangLianPoleNum(new Integer(info.getShuanglianPoleNum()).toString());

           OrderInfoRectSimpleView.this.m_TPoleNum.setSelectedIndex(info.getTPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveTPoleNum(new Integer(info.getTPoleNum()).toString());

           DecimalFormat nFormat = new DecimalFormat();
           nFormat.setMaximumFractionDigits(2);
           nFormat.setGroupingSize(10);
           OrderInfoRectSimpleView.this.m_Gap.setText(nFormat.format(info.getGap()));
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveGap(nFormat.format(info.getGap()));

           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveMagnetSliceNum(info.getMagnetSliceNum());

           if (info.getTPoleNum() == 0)
           {
             OrderInfoRectSimpleView.this.is_Same_Width.setSelected(true);
           }

           if (OrderInfoRectSimpleView.this.is_Same_Width.isSelected() == true)
           {
             OrderInfoRectSimpleView.this.txt_TPole_Pose.setText("");
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveTPolePos("");
           }
           if ((info.getTPoleNum() > 0) && (!OrderInfoRectSimpleView.this.is_Same_Width.isSelected()))
           {
             TPoleInputDialog dlg = new TPoleInputDialog(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.txt_TPole_Pose, info.getTPoleNum(), 1);
             dlg.show();
           }

           if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()))
           {
             if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos()))
             {
               OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
               CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
             }
             OrderInfoRectSimpleView.this.m_Bottom_HingeInstallType.setEnabled(true);
             OrderInfoRectSimpleView.this.m_Bottom_TPoleNum.setEnabled(true);
           }
           OrderInfoRectSimpleView.this.CheckCalcBt();
         }
       }
     });
     // 窗户扇数
     this.m_PanelNum.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePanelNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 单开合页扇数
     this.m_SingleHinge.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveSingleHinge(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 双开合页扇数
     this.m_DoubleHinge.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         Pattern numpattern = Pattern.compile("\\d*");
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         Matcher m = numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }

         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDoubleHinge(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 立杆数量
     this.m_PoleNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 对口立杆数量
     this.m_DuiKouPoleNum.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         Pattern numpattern = Pattern.compile("\\d*");
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         Matcher m = numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDuiKouPoleNum(str);

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // T型立杆数量
     this.m_TPoleNum.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
         Pattern numpattern = Pattern.compile("\\d*");
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         Matcher m = numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveTPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 双连立杆数
     this.cb_ShuangLianPoleNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveShuangLianPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 水平间隙
     this.m_Gap.addKeyListener(new KeyListener() {
       Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_Gap.getText();
         Matcher m = this.numpattern.matcher(str);
         if (!m.matches()) {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_Gap.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveGap(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     // 叶片规格
     this.m_VaneType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(b.getSelectedIndex());

         if ((OrderInfoRectSimpleView.this.m_VaneType.getSelectedIndex() == 4) && (OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex() == 1))
         {
           OrderInfoRectSimpleView.this.m_VaneType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(OrderInfoRectSimpleView.this.m_VaneType.getSelectedIndex());
           OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePullBarType(OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex());
           JOptionPane.showMessageDialog(null, "31mm不能选择隐式拉杆", "错误", 0);
         }

         if ((OrderInfoRectSimpleView.this.m_DividerNum.getSelectedItem() != null) && (!OrderInfoRectSimpleView.this.m_DividerNum.getSelectedItem().equals("")) && (!OrderInfoRectSimpleView.this.m_DividerNum.getSelectedItem().equals("0")))
         {
           int vanetype = b.getSelectedIndex();
           if ((vanetype == 0) || (vanetype == 2)) {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[2]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(2);
           }
           else if (vanetype == 1) {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[0]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(0);
           }
           else if (vanetype == 3)
           {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[1]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(1);
           }
           else
           {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[3]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(3);
           }
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 分隔梁数量
     this.m_DividerNum.addActionListener(new ActionListener()
     {
       public void actionPerformed(ActionEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerNum((String)b.getSelectedItem());
         if ((b.getSelectedItem() != null) && (!((String)b.getSelectedItem()).equals("")) && (!((String)b.getSelectedItem()).equals("0")))
         {
           OrderInfoRectSimpleView.this.m_DividerType.setEnabled(true);
           OrderInfoRectSimpleView.this.m_DividerPos.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos("");
           int vanetype = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetVaneType();
           OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
           if ((vanetype == 0) || (vanetype == 2)) {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[2]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(2);
           }
           else if (vanetype == 1) {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[0]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(0);
           }
           else if (vanetype == 3)
           {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[1]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(1);
           }
           else if (vanetype == 4)
           {
             OrderInfoRectSimpleView.this.m_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_DividerType.addItem(Constants.DIVIDERTYPE[3]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(3);
           }
           OrderInfoRectSimpleView.this.InputDividerPosDlg(true);
         }
         else
         {
           OrderInfoRectSimpleView.this.m_DividerPos.setText("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos("");
           OrderInfoRectSimpleView.this.m_DividerType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerType(-1);
           OrderInfoRectSimpleView.this.m_DividerType.setEnabled(false);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     this.m_DividerPos.addMouseListener(new MouseListener() {
       public void mouseClicked(MouseEvent e) {
         OrderInfoRectSimpleView.this.InputDividerPosDlg(false);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void mouseEntered(MouseEvent e)
       {
       }

       public void mouseExited(MouseEvent e)
       {
       }

       public void mousePressed(MouseEvent e)
       {
       }

       public void mouseReleased(MouseEvent e)
       {
       }
     });
   }

   private void initBottomPaneTabCompListener()
   {
   	// 窗户等宽(下层)
     this.is_Bottom_Same_Width.addChangeListener(new ChangeListener() {
       public void stateChanged(ChangeEvent e) {
         if (OrderInfoRectSimpleView.this.is_Bottom_Same_Width.isSelected())
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(true);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos("");
           OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText("");
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(false);
         }
         if (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist())
         {
           OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(false);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 实木（下层）
     this.is_Bottom_Bord.addChangeListener(new ChangeListener()
     {
       public void stateChanged(ChangeEvent e) {
       	// 底层为实木
         if (OrderInfoRectSimpleView.this.is_Bottom_Bord.isSelected())
         {
         	// 设置底层实木为true
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomIsBoard(true);
           OrderInfoRectSimpleView.this.m_Bottom_VaneType.setEnabled(false);
           OrderInfoRectSimpleView.this.m_Bottom_VaneType.setSelectedIndex(-1);
           // 设置叶片类型 为空 ，实木没有叶片
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomVaneType("");

           OrderInfoRectSimpleView.this.m_Bottom_DividerType.setEnabled(false);
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.setSelectedIndex(-1);
           // 设置分隔梁规格 为空
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType("");

           OrderInfoRectSimpleView.this.m_Bottom_DividerNum.setEnabled(false);
           OrderInfoRectSimpleView.this.m_Bottom_DividerNum.setSelectedIndex(-1);
           // 设置底层分隔梁数量 为空
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerNum("");

           OrderInfoRectSimpleView.this.m_Bottom_DividerPos.setEnabled(false);
           OrderInfoRectSimpleView.this.m_Bottom_DividerPos.setText("");
           // 设置底层分隔梁位置 为空
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerPos("");

           // 两层 && 实木
           if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard()))
           {
           	 // 实木没有拉杆 也就没有拉杆类型
             OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
             OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(false);
           }

         }
         // 底层不为实木
         else
         {
         	// 设置底层实木 为false
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomIsBoard(false);
           OrderInfoRectSimpleView.this.m_Bottom_VaneType.setEnabled(true);
           OrderInfoRectSimpleView.this.m_Bottom_DividerNum.setEnabled(true);
           OrderInfoRectSimpleView.this.m_PullBarType.setEnabled(true);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 合页安装方式（下层）
     this.m_Bottom_HingeInstallType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox cb = (JComboBox)e.getSource();
         String hingeInstall = (String)cb.getSelectedItem();

         if ((CurtainChecker.isEmpty(hingeInstall)) && (e.getStateChange() != 1))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请输入或者选择合页安装方式！", "错误", 0);
           OrderInfoRectSimpleView.this.cb_Bottom_BendHingePanel_Num.setSelectedItem("");
           OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText("");
           OrderInfoRectSimpleView.this.cb_Bottom_ShuangLianPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_SingleHinge.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_DoubleHinge.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_PanelNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_PoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_DuiKouPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_TPoleNum.setSelectedItem("");
           OrderInfoRectSimpleView.this.m_Bottom_Gap.setText("");
           OrderInfoRectSimpleView.this.CheckCalcBt();
           return;
         }

         String[] tempArray = hingeInstall.split(":");
         if (tempArray.length == 2)
         {
           hingeInstall = tempArray[1];
         }

         if (e.getStateChange() == 1L)
         {
           hingeInstall = CalculateUtils.formatHingeInstallType(hingeInstall);
           if (!CurtainChecker.isVaildHingeInstall(hingeInstall, CurtainChecker.simpleRectRegex))
           {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             JOptionPane.showMessageDialog(null, "您输入的合页安装方式不合法！", "错误", 0);
             OrderInfoRectSimpleView.this.cb_Bottom_BendHingePanel_Num.setSelectedItem("");
             if (CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist())
             {
               OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText("");
             }
             OrderInfoRectSimpleView.this.cb_Bottom_ShuangLianPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_SingleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_DoubleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_PanelNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_PoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_DuiKouPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_TPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_Gap.setText("");
             OrderInfoRectSimpleView.this.CheckCalcBt();
             return;
           }

           HingeRelatedInfo info = CalculateUtils.getSimpleRectHingeRelatedInfo(hingeInstall);

           int topTPoleNum = 0;
           String topTPoleNumStr = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum();
           if (!CurtainChecker.isEmpty(topTPoleNumStr))
           {
             topTPoleNum = Integer.parseInt(topTPoleNumStr);
           }
           if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()) && (topTPoleNum != info.getTPoleNum()))
           {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             JOptionPane.showMessageDialog(null, "没有横T，上下两层的T型立杆数量必须一致！", "错误", 0);
             OrderInfoRectSimpleView.this.cb_Bottom_BendHingePanel_Num.setSelectedItem("");
             OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText("");
             OrderInfoRectSimpleView.this.cb_Bottom_ShuangLianPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_SingleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_DoubleHinge.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_PanelNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_PoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_DuiKouPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_TPoleNum.setSelectedItem("");
             OrderInfoRectSimpleView.this.m_Bottom_Gap.setText("");
             return;
           }

           if (info.getTPoleNum() == 0)
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(true);
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(false);
           }
           else if (topTPoleNum != info.getTPoleNum())
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setEnabled(true);
           }

           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomHingeInstallType(hingeInstall);

           OrderInfoRectSimpleView.this.m_Bottom_PanelNum.setSelectedIndex(info.getPaneNum() - 1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomPanelNum(new Integer(info.getPaneNum()).toString());

           OrderInfoRectSimpleView.this.cb_Bottom_BendHingePanel_Num.setSelectedIndex(info.getBendHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomBendHinge(new Integer(info.getBendHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_Bottom_SingleHinge.setSelectedIndex(info.getSingleHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSingeHinge(new Integer(info.getSingleHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_Bottom_DoubleHinge.setSelectedIndex(info.getDoubleHingePaneNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDoubleHinge(new Integer(info.getDoubleHingePaneNum()).toString());

           OrderInfoRectSimpleView.this.m_Bottom_PoleNum.setSelectedIndex(info.getPoleNum() - 1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomPoleNum(new Integer(info.getPoleNum()).toString());

           OrderInfoRectSimpleView.this.m_Bottom_DuiKouPoleNum.setSelectedIndex(info.getDuikouPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDuiKouPoleNum(new Integer(info.getDuikouPoleNum()).toString());

           OrderInfoRectSimpleView.this.cb_Bottom_ShuangLianPoleNum.setSelectedIndex(info.getShuanglianPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomShuangLianPoleNum(new Integer(info.getShuanglianPoleNum()).toString());

           OrderInfoRectSimpleView.this.m_Bottom_TPoleNum.setSelectedIndex(info.getTPoleNum());
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPoleNum(new Integer(info.getTPoleNum()).toString());

           DecimalFormat nFormat = new DecimalFormat();
           nFormat.setMaximumFractionDigits(2);
           nFormat.setGroupingSize(10);
           OrderInfoRectSimpleView.this.m_Bottom_Gap.setText(nFormat.format(info.getGap()));
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomGap(nFormat.format(info.getGap()));

           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveMagnetSliceNum(CurtainDesign.m_UserMainGUI.GetOrderInfo().getMagnetSliceNum() + info.getMagnetSliceNum());

           if (info.getTPoleNum() == 0)
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(true);
           }

           if (OrderInfoRectSimpleView.this.is_Bottom_Same_Width.isSelected() == true)
           {
             OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose.setText("");
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPolePos("");
           }
           if ((info.getTPoleNum() > 0) && (!OrderInfoRectSimpleView.this.is_Bottom_Same_Width.isSelected()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()))
           {
             TPoleInputDialog dlg = new TPoleInputDialog(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose, info.getTPoleNum(), 2);
             dlg.show();
           }
           if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetHingeInstallType().trim().equalsIgnoreCase(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomHingeInstallType())) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getSamePanelWidth()))
           {
             OrderInfoRectSimpleView.this.is_Bottom_Same_Width.setSelected(true);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSameWidth(true);
           }
         }

         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 窗户扇数 (下层)
     this.m_Bottom_PanelNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         Pattern numpattern = Pattern.compile("\\d*");
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         Matcher m = numpattern.matcher(str);
         if (!m.matches())
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomPanelNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });

     // T型立杆位置（下层）
     this.txt_Bottom_TPole_Pose.setEnabled(false);
     this.txt_Bottom_TPole_Pose.addMouseListener(new MouseListener()
     {
       public void mouseClicked(MouseEvent e) {
         String tPoleNum = CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum();
         if ((!CurtainChecker.isEmpty(tPoleNum)) && (CurtainChecker.isInteger(tPoleNum)) && (new Integer(tPoleNum).intValue() > 0) && (!OrderInfoRectSimpleView.this.is_Bottom_Same_Width.isSelected()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()))
         {
           int num = new Integer(tPoleNum).intValue();
           TPoleInputDialog dlg = new TPoleInputDialog(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.txt_Bottom_TPole_Pose, num, 2);
           dlg.show();
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void mouseEntered(MouseEvent e)
       {
       }

       public void mouseExited(MouseEvent e)
       {
       }

       public void mousePressed(MouseEvent e)
       {
       }

       public void mouseReleased(MouseEvent e)
       {
       }
     });
     // 弯曲合页扇数（下层）
     this.cb_Bottom_BendHingePanel_Num.setEditable(true);
     this.cb_Bottom_BendHingePanel_Num.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String num = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(num))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           num = "";
           b.setSelectedItem(num);
         }
         else
         {
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomBendHinge(num);
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
	   // 单开合页扇数（下层）
     this.m_Bottom_SingleHinge.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomSingeHinge(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
	   // 双开合页扇数（下层）
     this.m_Bottom_DoubleHinge.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDoubleHinge(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 立杆数量（下层）
     this.m_Bottom_PoleNum.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 对口立杆数量（下层）
     this.m_Bottom_DuiKouPoleNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDuiKouPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // T型立杆数量（下层）
     this.m_Bottom_TPoleNum.addActionListener(new ActionListener()
     {
       public void actionPerformed(ActionEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomTPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 双连立杆数量（下层）
     this.cb_Bottom_ShuangLianPoleNum.addItemListener(new ItemListener()
     {
       public void itemStateChanged(ItemEvent e)
       {
         JComboBox b = (JComboBox)e.getSource();
         String str = (String)b.getSelectedItem();
         if (!CurtainChecker.isInteger(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = "";
           b.setSelectedItem(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomShuangLianPoleNum(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 水平间隙（下层）
     this.m_Bottom_Gap.addKeyListener(new KeyListener()
     {
       public void keyTyped(KeyEvent e) {
       }

       public void keyReleased(KeyEvent e) {
         String str = OrderInfoRectSimpleView.this.m_Bottom_Gap.getText();
         if (!CurtainChecker.isNumber(str))
         {
           OrderInfoRectSimpleView.this.getToolkit().beep();
           e.consume();
           JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);
           str = str.substring(0, str.length() - 1);
           OrderInfoRectSimpleView.this.m_Bottom_Gap.setText(str);
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomGap(str);
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void keyPressed(KeyEvent e)
       {
       }
     });
     // 叶片规格(下层)
     this.m_Bottom_VaneType.addItemListener(new ItemListener() {
       public void itemStateChanged(ItemEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomVaneType((String)b.getSelectedItem());

         if ((OrderInfoRectSimpleView.this.m_Bottom_VaneType.getSelectedIndex() == 4) && (OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex() == 1))
         {
           OrderInfoRectSimpleView.this.m_Bottom_VaneType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(OrderInfoRectSimpleView.this.m_VaneType.getSelectedIndex());

           OrderInfoRectSimpleView.this.m_PullBarType.setSelectedIndex(-1);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePullBarType(OrderInfoRectSimpleView.this.m_PullBarType.getSelectedIndex());
           JOptionPane.showMessageDialog(null, "31mm不能选择隐式拉杆", "错误", 0);
         }

         if ((OrderInfoRectSimpleView.this.m_Bottom_DividerNum.getSelectedItem() != null) && (!OrderInfoRectSimpleView.this.m_Bottom_DividerNum.getSelectedItem().equals("")) && (!OrderInfoRectSimpleView.this.m_Bottom_DividerNum.getSelectedItem().equals("0")))
         {
           int vanetype = b.getSelectedIndex();
           if ((vanetype == 0) || (vanetype == 2)) {
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[2]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[2]);
           }
           else if (vanetype == 1) {
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[0]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[0]);
           }
           else if (vanetype == 3)
           {
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[1]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[1]);
           }
           else
           {
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
             OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[3]);
             CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[3]);
           }
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 分隔梁数量(下层)
     this.m_Bottom_DividerNum.addActionListener(new ActionListener()
     {
       public void actionPerformed(ActionEvent e) {
         JComboBox b = (JComboBox)e.getSource();
         CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerNum((String)b.getSelectedItem());

         int vanetype = OrderInfoRectSimpleView.this.m_Bottom_VaneType.getSelectedIndex();
         if ((vanetype == 0) || (vanetype == 2)) {
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[2]);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[2]);
         }
         else if (vanetype == 1) {
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[0]);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[0]);
         }
         else if ((vanetype == 3) || (vanetype == 4))
         {
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[1]);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[1]);
         }
         else
         {
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.removeAllItems();
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.addItem(Constants.DIVIDERTYPE[3]);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerType(Constants.DIVIDERTYPE[3]);
         }

         if ((null != b.getSelectedItem()) && (!((String)b.getSelectedItem()).equals("")) && (!((String)b.getSelectedItem()).equals("0")))
         {
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.setEnabled(true);
           OrderInfoRectSimpleView.this.m_Bottom_DividerPos.setText("");
           DividerPosInputDlg dlg = new DividerPosInputDlg(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.m_Bottom_DividerPos, b.getSelectedIndex(), 2);
           dlg.show();
         }
         else
         {
           OrderInfoRectSimpleView.this.m_Bottom_DividerPos.setText("");
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.setSelectedIndex(-1);
           OrderInfoRectSimpleView.this.m_Bottom_DividerType.setEnabled(false);
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerNum("");
           CurtainDesign.m_UserMainGUI.GetOrderInfo().saveBottomDividerPos("");
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     // 分隔梁位置(下层)
     this.m_Bottom_DividerPos.addMouseListener(new MouseListener() {
       public void mouseClicked(MouseEvent e) {
         String num = CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum();
         if ((!CurtainChecker.isEmpty(num)) && (CurtainChecker.isInteger(num)) && (new Integer(num).intValue() > 0))
         {
           DividerPosInputDlg dlg = new DividerPosInputDlg(CurtainDesign.m_UserMainGUI, OrderInfoRectSimpleView.this.m_Bottom_DividerPos, new Integer(num).intValue(), 2);
           dlg.show();
         }
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }

       public void mouseEntered(MouseEvent e)
       {
       }

       public void mouseExited(MouseEvent e)
       {
       }

       public void mousePressed(MouseEvent e)
       {
       }

       public void mouseReleased(MouseEvent e) {
       }
     });
   }

   public void InitGenPaneLayout() {
     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     this.m_GenInfoPane.setLayout(gbl);
     Border border = BorderFactory.createLineBorder(Color.gray, 2);
     this.m_GenInfoPane.setBorder(border);

     gbc.fill = 1;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 5, 15, 5);
     gbc.gridwidth = 1;

     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[0].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[0].setText("订单编号");
     this.m_JLabel[0].setToolTipText("Order Number");
     gbl.setConstraints(this.m_JLabel[0], gbc);
     this.m_GenInfoPane.add(this.m_JLabel[0]);

     gbc.gridwidth = 2;
     gbc.ipadx = 120;
     this.m_OrderIndex.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_OrderIndex.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOrderIndex());
     }

     gbl.setConstraints(this.m_OrderIndex, gbc);
     this.m_GenInfoPane.add(this.m_OrderIndex);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[1].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[1].setText("客户名称");
     this.m_JLabel[1].setToolTipText("Client Name");
     gbl.setConstraints(this.m_JLabel[1], gbc);
     this.m_GenInfoPane.add(this.m_JLabel[1]);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     this.m_ClientRegion.setFont(new Font("Dialog", 0, 13));
     this.m_ClientRegion.setEditable(true);
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_ClientRegion.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetClientRegion());
     }

     gbl.setConstraints(this.m_ClientRegion, gbc);
     this.m_GenInfoPane.add(this.m_ClientRegion);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[29].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[29].setText("房间");
     this.m_JLabel[29].setToolTipText("Room");
     gbl.setConstraints(this.m_JLabel[29], gbc);
     this.m_GenInfoPane.add(this.m_JLabel[29]);

     gbc.gridwidth = 2;
     gbc.ipadx = 120;
     gbl.setConstraints(this.m_Room, gbc);
     this.m_Room.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_Room.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetRoom());
     }

     this.m_GenInfoPane.add(this.m_Room);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[4].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[4].setText("流水号");
     gbl.setConstraints(this.m_JLabel[4], gbc);
     this.m_GenInfoPane.add(this.m_JLabel[4]);

     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_PipeIndex.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       String tmppipe = "";
       if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPipeIndex().equals(""))
       {
         tmppipe = CurtainDesign.m_PipeIndexFile.GetPipeIndex(Constants.STYLES[0], true);
       }
       else
       {
         tmppipe = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPipeIndex();
       }

       this.m_PipeIndex.setText(tmppipe);
       this.m_PipeIndex.setEditable(false);
       CurtainDesign.m_UserMainGUI.GetOrderInfo().SavePipeIndex(tmppipe);
     }
     gbl.setConstraints(this.m_PipeIndex, gbc);
     this.m_GenInfoPane.add(this.m_PipeIndex);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[2].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[2].setText("下单日期");
     this.m_JLabel[2].setToolTipText("Order Date");
     gbl.setConstraints(this.m_JLabel[2], gbc);
     this.m_GenInfoPane.add(this.m_JLabel[2]);

     gbc.gridwidth = 2;
     gbc.ipadx = 120;
     gbc.ipady = 15;
     this.m_OrderDate.setName("OrderDate");
     this.m_OrderDate.setFont(new Font("Dialog", 0, 13));

     Border bodr = new BevelBorder(0, Color.lightGray, Color.white, Color.black, Color.gray);

     this.m_OrderDate.setBorder(bodr);
     gbl.setConstraints(this.m_OrderDate, gbc);
     this.m_GenInfoPane.add(this.m_OrderDate);

     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_OrderDate.setDate(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOrderDate());
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_CustRefNumLabel.setFont(new Font("Dialog", 0, 13));
     this.m_CustRefNumLabel.setToolTipText("Customer Ref Num");
     gbl.setConstraints(this.m_CustRefNumLabel, gbc);
     this.m_GenInfoPane.add(this.m_CustRefNumLabel);

     gbc.gridwidth = 0;
     gbc.ipadx = 120;
     gbl.setConstraints(this.m_CustRefNum, gbc);
     this.m_CustRefNum.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_CustRefNum.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().getCustRefNum());
     }

     this.m_GenInfoPane.add(this.m_CustRefNum);
   }

   public void InitWindowPaneLayout()
   {
     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     this.m_WindowInfoPane.setLayout(gbl);
     Border border = BorderFactory.createLineBorder(Color.gray, 2);
     this.m_WindowInfoPane.setBorder(border);

     gbc.fill = 2;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 5, 15, 5);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[11].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[11].setText("窗户总数");
     this.m_JLabel[11].setToolTipText("Total Window Number");
     gbl.setConstraints(this.m_JLabel[11], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[11]);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     this.m_WindowNum.setEditable(true);
     this.m_WindowNum.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       String windownum = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWindowNum();

       if ((windownum == null) || (windownum.equals("")))
         this.m_WindowNum.setSelectedIndex(-1);
       else {
         this.m_WindowNum.setSelectedItem(windownum);
       }
     }
     gbl.setConstraints(this.m_WindowNum, gbc);
     this.m_WindowInfoPane.add(this.m_WindowNum);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[10].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[10].setText("窗户编号");
     this.m_JLabel[10].setToolTipText("No.of Window");
     gbl.setConstraints(this.m_JLabel[10], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[10]);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     this.m_WindowIndex.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_WindowIndex.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWindowIndex());
     }

     gbl.setConstraints(this.m_WindowIndex, gbc);
     this.m_WindowInfoPane.add(this.m_WindowIndex);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[9].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[9].setText("木材选择");
     gbl.setConstraints(this.m_JLabel[9], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[9]);

     gbc.gridwidth = 2;
     gbc.ipadx = 30;
     gbc.ipady = 5;
     gbl.setConstraints(this.m_WoodOptions, gbc);
     this.m_WindowInfoPane.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_WoodOptions.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWoodOption());
     }

     this.m_WindowInfoPane.add(this.m_WoodOptions);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[5].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[5].setText("颜色");
     this.m_JLabel[5].setToolTipText("Color");
     gbl.setConstraints(this.m_JLabel[5], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[5]);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     this.m_Color.setEditable(true);
     this.m_Color.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_Color.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetColor());
     }
     gbl.setConstraints(this.m_Color, gbc);
     this.m_WindowInfoPane.add(this.m_Color);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[12].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[12].setText("窗户宽度(mm)");
     this.m_JLabel[12].setToolTipText("Width of Window");
     gbl.setConstraints(this.m_JLabel[12], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[12]);

     gbc.gridwidth = 2;
     gbc.ipadx = 70;
     gbl.setConstraints(this.m_OriWindowWidth, gbc);
     this.m_OriWindowWidth.setFont(new Font("Dialog", 0, 13));
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOriWindowWidth()))
     {
       this.m_OriWindowWidth.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOriWindowWidth());
     }
     this.m_WindowInfoPane.add(this.m_OriWindowWidth);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[13].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[13].setText("窗户高度(mm)");
     this.m_JLabel[13].setToolTipText("Height of Window");
     gbl.setConstraints(this.m_JLabel[13], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[13]);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.m_OriWindowHeight, gbc);
     this.m_OriWindowHeight.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_OriWindowHeight.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOriWindowHeight());
     }

     this.m_WindowInfoPane.add(this.m_OriWindowHeight);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.m_JLabel[33].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[33].setText("安装方式");
     this.m_JLabel[33].setToolTipText("Mount");
     gbl.setConstraints(this.m_JLabel[33], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[33]);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     this.m_Install.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_Install.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetInstall());
     }
     gbl.setConstraints(this.m_Install, gbc);
     this.m_WindowInfoPane.add(this.m_Install);
     this.m_Install.setEnabled(true);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[7].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[7].setText("合页颜色");
     this.m_JLabel[7].setToolTipText("Hinge Color");
     gbl.setConstraints(this.m_JLabel[7], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[7]);

     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_HingeColor, gbc);
     this.m_HingeColor.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_HingeColor.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetHingeColor());
     }
     this.m_WindowInfoPane.add(this.m_HingeColor);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[32].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[32].setText("外框数量和位置");
     this.m_JLabel[32].setToolTipText("Frame Number and Location");
     gbl.setConstraints(this.m_JLabel[32], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[32]);

     gbc.gridwidth = 2;
     gbc.ipadx = 70;
     gbl.setConstraints(this.m_FrameNumPos, gbc);
     this.m_FrameNumPos.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null)
     {
       int b = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameNumPos();
       this.m_FrameNumPos.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameNumPos());
       if (b == 0) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(2);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
       } else if (b == 1) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(2);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
       } else if (b == 2) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(0);
         this.m_FrameType.setSelectedIndex(-1);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameType(-1);
       } else if (b == 3) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(1);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
       } else if (b == 4) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(1);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
       } else if (b == 5) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(1);
       } else if (b == 6) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(1);
       } else if (b == 7) {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(0);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(2);
       } else {
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameWidthNum(-1);
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveFrameHeightNum(-1);
       }
     }

     this.m_WindowInfoPane.add(this.m_FrameNumPos);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[16].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[16].setText("外框类型");
     this.m_JLabel[16].setToolTipText("Frame Type");
     gbl.setConstraints(this.m_JLabel[16], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[16]);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.m_FrameType, gbc);
     this.m_FrameType.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_FrameType.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameType());
       if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameType() == -1)
       {
         this.m_FrameType.setEnabled(false);
       }
       else
       {
         this.m_FrameType.setEnabled(true);
       }
     }
     this.m_WindowInfoPane.add(this.m_FrameType);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[26].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[26].setText("拉杆类型");
     this.m_JLabel[26].setToolTipText("Type of Tilt Rod");
     gbl.setConstraints(this.m_JLabel[26], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[26]);

     gbc.gridwidth = 2;
     gbc.ipadx = 5;
     gbl.setConstraints(this.m_PullBarType, gbc);
     this.m_PullBarType.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_PullBarType.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPullBarType());
     }
     if (((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("1")) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard())) || ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard())))
     {
       this.m_PullBarType.setEnabled(false);
     }
     this.m_WindowInfoPane.add(this.m_PullBarType);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[34].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[34].setText("磁碰类型");
     this.m_JLabel[34].setToolTipText("Magnet Type");
     gbl.setConstraints(this.m_JLabel[34], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[34]);

     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.cb_Magnet, gbc);
     this.m_WindowInfoPane.add(this.cb_Magnet);
     boolean isRoundMagnet = CurtainDesign.m_UserMainGUI.GetOrderInfo().IsRoundMagnet();
     if (isRoundMagnet)
     {
       this.cb_Magnet.setSelectedItem(Constants.MAGNET_TYPE[0]);
     }
     else
     {
       this.cb_Magnet.setSelectedItem(Constants.MAGNET_TYPE[1]);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     this.l_TPoleType.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(this.l_TPoleType, gbc);
     this.m_WindowInfoPane.add(this.l_TPoleType);

     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     this.cb_TPoleType.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(this.cb_TPoleType, gbc);
     this.m_WindowInfoPane.add(this.cb_TPoleType);
     String tPoleType = CurtainDesign.m_UserMainGUI.GetOrderInfo().getTPoleType();
     if (!CurtainChecker.isEmpty(tPoleType))
     {
       this.cb_TPoleType.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().getTPoleType());
     }

     gbc.gridwidth = -1;
     JLabel blank1 = new JLabel("");
     gbc.ipadx = 5;
     gbl.setConstraints(blank1, gbc);
     this.m_WindowInfoPane.add(blank1);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.is_AutoDivider, gbc);
     this.is_AutoDivider.setFont(new Font("Dialog", 0, 13));
     this.m_WindowInfoPane.add(this.is_AutoDivider);
     this.is_AutoDivider.setSelected(CurtainDesign.m_UserMainGUI.GetOrderInfo().getAutoAddDivider());

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;

     this.m_JLabel[35].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[35].setText("层数");
     this.m_JLabel[35].setToolTipText("Level of Window");
     gbl.setConstraints(this.m_JLabel[35], gbc);
     this.m_WindowInfoPane.add(this.m_JLabel[35]);

     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     gbl.setConstraints(this.m_Level, gbc);
     this.m_Level.setFont(new Font("Dialog", 0, 13));
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel()))
     {
       this.m_Level.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel());
       if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2"))
       {
         this.is_Same_Height.setEnabled(true);
         this.is_HT_Pole.setEnabled(true);
         if (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getSameHeight())
         {
           this.txt_HTPole_Pos.setEnabled(true);
         }
         else
         {
           this.txt_HTPole_Pos.setEnabled(false);
         }
       }
       else
       {
         this.is_Same_Height.setEnabled(false);
         this.is_HT_Pole.setEnabled(false);
         this.txt_HTPole_Pos.setEnabled(false);
       }
     }
     else
     {
       this.is_Same_Height.setEnabled(false);
       this.is_HT_Pole.setEnabled(false);
       this.txt_HTPole_Pos.setEnabled(false);
     }
     this.m_WindowInfoPane.add(this.m_Level);

     gbc.gridwidth = -1;
     JLabel blank = new JLabel("");
     gbc.ipadx = 5;
     gbl.setConstraints(blank, gbc);
     this.m_WindowInfoPane.add(blank);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.is_Same_Height, gbc);
     this.is_Same_Height.setFont(new Font("Dialog", 0, 13));
     this.m_WindowInfoPane.add(this.is_Same_Height);
     this.is_Same_Height.setSelected(CurtainDesign.m_UserMainGUI.GetOrderInfo().getSameHeight());

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     gbl.setConstraints(this.is_HT_Pole, gbc);
     this.m_WindowInfoPane.add(this.is_HT_Pole);
     this.is_HT_Pole.setFont(new Font("Dialog", 0, 13));
     this.is_HT_Pole.setSelected(CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist());
     if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")))
     {
       this.is_Bottom_Same_Width.setEnabled(false);
     }

     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     blank = new JLabel();
     gbl.setConstraints(blank, gbc);
     this.m_WindowInfoPane.add(blank);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     gbl.setConstraints(this.l_HTPole_Pos, gbc);
     this.l_HTPole_Pos.setFont(new Font("Dialog", 0, 13));
     this.m_WindowInfoPane.add(this.l_HTPole_Pos);
     if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")))
     {
       this.l_HTPole_Pos.setText("横T高度");
     }

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.txt_HTPole_Pos, gbc);
     this.txt_HTPole_Pos.setFont(new Font("Dialog", 0, 13));
     this.m_WindowInfoPane.add(this.txt_HTPole_Pos);
     String htPolePos = CurtainDesign.m_UserMainGUI.GetOrderInfo().getHtPolePos();
     if (!CurtainChecker.isEmpty(htPolePos))
     {
       this.txt_HTPole_Pos.setText(htPolePos);
     }
   }

   public void InitPanelPaneLayout()
   {
     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     this.m_PanelPane.setLayout(gbl);
     Border border = BorderFactory.createLineBorder(Color.gray, 2);
     this.m_PanelPane.setBorder(border);

     gbc.fill = 1;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 5, 5, 5);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbl.setConstraints(this.is_Same_Width, gbc);
     this.is_Same_Width.setFont(new Font("Dialog", 0, 13));
     this.m_PanelPane.add(this.is_Same_Width);
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().getSamePanelWidth())
     {
       this.is_Same_Width.setSelected(true);
     }
     else
     {
       this.is_Same_Width.setSelected(false);
     }

     if ((!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum())) && (Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum()) <= 0))
     {
       this.is_Same_Width.setEnabled(false);
     }
     gbc.gridwidth = 2;
     gbc.ipadx = 5;
     JLabel blankLabel = new JLabel();
     gbl.setConstraints(blankLabel, gbc);
     this.m_PanelPane.add(blankLabel);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     gbl.setConstraints(this.is_Bord, gbc);
     this.is_Bord.setFont(new Font("Dialog", 0, 13));
     this.m_PanelPane.add(this.is_Bord);
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard())
     {
       this.is_Bord.setSelected(true);
       this.m_VaneType.setSelectedIndex(-1);
       this.m_VaneType.setEnabled(false);
       this.m_DividerNum.setSelectedIndex(-1);
       this.m_DividerNum.setEnabled(false);
       this.m_DividerPos.setText("");
       this.m_DividerPos.setEnabled(false);
       CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveVaneType(-1);
       CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerNum("-1");
       CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos("");
     }
     else
     {
       this.is_Bord.setSelected(false);
       this.m_VaneType.setEnabled(true);
       this.m_DividerNum.setEnabled(true);
     }
     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     blankLabel = new JLabel();
     gbl.setConstraints(blankLabel, gbc);
     this.m_PanelPane.add(blankLabel);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[8].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[8].setText("合页安装方式");
     this.m_JLabel[8].setToolTipText("Hinging");
     gbl.setConstraints(this.m_JLabel[8], gbc);
     this.m_PanelPane.add(this.m_JLabel[8]);
     gbc.gridwidth = 2;
     gbc.ipadx = 0;
     gbl.setConstraints(this.m_HingeInstallType, gbc);
     this.m_HingeInstallType.setFont(new Font("Dialog", 0, 13));
     this.m_HingeInstallType.setEditable(true);
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_HingeInstallType.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetHingeInstallType());
     }
     this.m_PanelPane.add(this.m_HingeInstallType);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[15].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[15].setText("窗户扇数");
     this.m_JLabel[15].setToolTipText("Panel Number");
     gbl.setConstraints(this.m_JLabel[15], gbc);
     this.m_PanelPane.add(this.m_JLabel[15]);
     gbc.gridwidth = 0;
     gbc.ipadx = 70;
     gbl.setConstraints(this.m_PanelNum, gbc);
     this.m_PanelNum.setFont(new Font("Dialog", 0, 13));
     this.m_PanelNum.setEditable(true);
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_PanelNum.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPanelNum());
     }
     this.m_PanelPane.add(this.m_PanelNum);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     JLabel l_TPolePose = new JLabel("T型立杆位置(mm)");
     l_TPolePose.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_TPolePose, gbc);
     this.m_PanelPane.add(l_TPolePose);
     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     this.txt_TPole_Pose.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(this.txt_TPole_Pose, gbc);
     this.txt_TPole_Pose.setEditable(false);
     this.m_PanelPane.add(this.txt_TPole_Pose);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos()))
     {
       this.txt_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos());
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_BendHingePanel_Num = new JLabel("弯曲合页扇数");
     l_BendHingePanel_Num.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_BendHingePanel_Num, gbc);
     this.m_PanelPane.add(l_BendHingePanel_Num);
     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     blankLabel = new JLabel();
     this.cb_BendHingePanel_Num.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(this.cb_BendHingePanel_Num, gbc);
     this.m_PanelPane.add(this.cb_BendHingePanel_Num);
     if ((CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBendHinge())) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBendHinge().trim().equals("0")))
     {
       this.cb_BendHingePanel_Num.setSelectedIndex(0);
     }
     else
     {
       this.cb_BendHingePanel_Num.setSelectedIndex(new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBendHinge()).intValue());
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[6].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[6].setText("单开合页扇数");
     gbl.setConstraints(this.m_JLabel[6], gbc);
     this.m_PanelPane.add(this.m_JLabel[6]);
     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_SingleHinge, gbc);
     this.m_SingleHinge.setFont(new Font("Dialog", 0, 13));
     this.m_SingleHinge.setEditable(true);
     if ((CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetSingleHinge())) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetSingleHinge().trim().equals("0")))
     {
       this.m_SingleHinge.setSelectedIndex(-1);
     }
     else
     {
       this.m_SingleHinge.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetSingleHinge());
     }
     this.m_PanelPane.add(this.m_SingleHinge);
     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[31].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[31].setText("双开合页扇数");
     gbl.setConstraints(this.m_JLabel[31], gbc);
     this.m_PanelPane.add(this.m_JLabel[31]);

     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_DoubleHinge, gbc);
     this.m_DoubleHinge.setFont(new Font("Dialog", 0, 13));
     this.m_DoubleHinge.setEditable(true);
     if ((CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDoubleHinge())) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDoubleHinge().trim().equals("0")))
     {
       this.m_DoubleHinge.setSelectedIndex(0);
     }
     else
     {
       this.m_DoubleHinge.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDoubleHinge());
     }
     this.m_PanelPane.add(this.m_DoubleHinge);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[19].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[19].setText("立杆数量");
     this.m_JLabel[19].setToolTipText("Q'ty of Stiles");
     gbl.setConstraints(this.m_JLabel[19], gbc);
     this.m_PanelPane.add(this.m_JLabel[19]);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_PoleNum, gbc);
     this.m_PoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_PoleNum.setEditable(true);
     if ((CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPoleNum())) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPoleNum().trim().equals("0")))
     {
       this.m_PoleNum.setSelectedIndex(-1);
     }
     else
     {
       this.m_PoleNum.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPoleNum());
     }

     this.m_PanelPane.add(this.m_PoleNum);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[20].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[20].setText("对口立杆数量");
     this.m_JLabel[20].setToolTipText("Q'ty of Rabbit Stiles");
     gbl.setConstraints(this.m_JLabel[20], gbc);
     this.m_PanelPane.add(this.m_JLabel[20]);
     gbc.gridwidth = 0;
     gbc.ipadx = 60;
     gbl.setConstraints(this.m_DuiKouPoleNum, gbc);
     this.m_DuiKouPoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_DuiKouPoleNum.setEditable(true);
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_DuiKouPoleNum.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDuiKouPoleNum());
     }

     this.m_PanelPane.add(this.m_DuiKouPoleNum);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[27].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[27].setText("T型立杆数量");
     this.m_JLabel[27].setToolTipText("T Post Number");
     gbl.setConstraints(this.m_JLabel[27], gbc);
     this.m_PanelPane.add(this.m_JLabel[27]);
     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_TPoleNum, gbc);
     this.m_TPoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_TPoleNum.setEditable(true);
     if (CurtainDesign.m_UserMainGUI != null)
     {
       this.m_TPoleNum.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum());
     }

     this.m_PanelPane.add(this.m_TPoleNum);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_ShuangLianPoleNum = new JLabel("双连立杆数");
     l_ShuangLianPoleNum.setFont(new Font("Dialog", 0, 13));
     l_ShuangLianPoleNum.setToolTipText("ShuangLian Pole Number");
     gbl.setConstraints(l_ShuangLianPoleNum, gbc);
     this.m_PanelPane.add(l_ShuangLianPoleNum);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.cb_ShuangLianPoleNum, gbc);
     this.cb_ShuangLianPoleNum.setFont(new Font("Dialog", 0, 13));
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getShuangLianPoleNum()))
     {
       this.cb_ShuangLianPoleNum.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().getShuangLianPoleNum());
     }
     this.m_PanelPane.add(this.cb_ShuangLianPoleNum);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[30].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[30].setText("水平间隙(mm)");
     this.m_JLabel[30].setToolTipText("Horizontal Gap");
     gbl.setConstraints(this.m_JLabel[30], gbc);
     this.m_PanelPane.add(this.m_JLabel[30]);
     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     gbl.setConstraints(this.m_Gap, gbc);
     this.m_Gap.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_Gap.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetGap());
     }
     this.m_PanelPane.add(this.m_Gap);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[21].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[21].setText("叶片规格(mm)");
     this.m_JLabel[21].setToolTipText("Louver Size");
     gbl.setConstraints(this.m_JLabel[21], gbc);
     this.m_PanelPane.add(this.m_JLabel[21]);
     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_VaneType, gbc);
     this.m_VaneType.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       this.m_VaneType.setSelectedIndex(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetVaneType());
     }
     this.m_PanelPane.add(this.m_VaneType);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[25].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[25].setText("分隔梁规格(mm)");
     this.m_JLabel[25].setToolTipText("Divider Size");
     gbl.setConstraints(this.m_JLabel[25], gbc);
     this.m_PanelPane.add(this.m_JLabel[25]);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_DividerType, gbc);
     this.m_DividerType.setFont(new Font("Dialog", 0, 13));
     if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDividerNum().equals("")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDividerNum().equals("0")) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetVaneType() > -1))
     {
       int vanetype = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetVaneType();
       this.m_DividerType.removeAllItems();
       Vector vector = new Vector();
       int dividerArrayPos = 0;
       if (vanetype == 3)
       {
         dividerArrayPos = 1;
       }
       else if ((vanetype == 0) || (vanetype == 2)) {
         dividerArrayPos = 2;
       }
       else if (vanetype == 4) {
         dividerArrayPos = 3;
       }
       this.m_DividerType.removeAllItems();
       vector.add(Constants.DIVIDERTYPE[dividerArrayPos]);
       this.m_DividerType.addItem(vector.elementAt(0));
       this.m_DividerType.setSelectedIndex(0);
     }
     else
     {
       this.m_DividerType.setEnabled(false);
       this.m_DividerType.setSelectedIndex(-1);
     }
     this.m_PanelPane.add(this.m_DividerType);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     this.m_JLabel[23].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[23].setText("分隔梁数量");
     this.m_JLabel[23].setToolTipText("Divider Number for each Panel");
     gbl.setConstraints(this.m_JLabel[23], gbc);
     this.m_PanelPane.add(this.m_JLabel[23]);
     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_DividerNum, gbc);
     this.m_DividerNum.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null)
     {
       String divnum = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDividerNum();
       if (divnum.equals(""))
       {
         this.m_DividerNum.setSelectedIndex(-1);
       }
       else
       {
         this.m_DividerNum.setSelectedItem(divnum);
       }
     }
     this.m_PanelPane.add(this.m_DividerNum);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     this.m_JLabel[24].setFont(new Font("Dialog", 0, 13));
     this.m_JLabel[24].setText("分隔梁位置(mm)");
     this.m_JLabel[24].setToolTipText("Divider Location");
     gbl.setConstraints(this.m_JLabel[24], gbc);
     this.m_PanelPane.add(this.m_JLabel[24]);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_DividerPos, gbc);
     this.m_DividerPos.setFont(new Font("Dialog", 0, 13));
     if (CurtainDesign.m_UserMainGUI != null) {
       String temp = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDivederPos();
       this.m_DividerPos.setText(temp);
     }
     this.m_DividerPos.setEditable(false);
     this.m_PanelPane.add(this.m_DividerPos);
   }

   public void InitBottomPanelPaneLayout()
   {
     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     this.bottom_WinPanel.setLayout(gbl);
     Border border = BorderFactory.createLineBorder(Color.gray, 2);
     this.bottom_WinPanel.setBorder(border);

     gbc.fill = 1;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 5, 5, 5);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbl.setConstraints(this.is_Bottom_Same_Width, gbc);
     this.is_Bottom_Same_Width.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.is_Bottom_Same_Width);
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomSameWidth())
     {
       this.is_Bottom_Same_Width.setSelected(true);
     }
     else
     {
       this.is_Bottom_Same_Width.setSelected(false);
     }
     if ((!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum())) && (Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum()) <= 0))
     {
       this.is_Bottom_Same_Width.setEnabled(false);
     }
     gbc.gridwidth = 2;
     gbc.ipadx = 5;
     JLabel blankLabel = new JLabel();
     gbl.setConstraints(blankLabel, gbc);
     this.bottom_WinPanel.add(blankLabel);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     gbl.setConstraints(this.is_Bottom_Bord, gbc);
     this.is_Bottom_Bord.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.is_Bottom_Bord);
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard())
     {
       this.is_Bottom_Bord.setSelected(true);
       this.m_Bottom_VaneType.setEnabled(false);
       this.m_Bottom_VaneType.setSelectedIndex(-1);

       this.m_Bottom_DividerType.setEnabled(false);
       this.m_Bottom_DividerType.setSelectedIndex(-1);

       this.m_Bottom_DividerNum.setEnabled(false);
       this.m_Bottom_DividerNum.setSelectedIndex(-1);

       this.m_Bottom_DividerPos.setEnabled(false);
       this.m_Bottom_DividerPos.setText("");
     }
     else
     {
       this.is_Bottom_Bord.setSelected(false);
     }
     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     blankLabel = new JLabel();
     gbl.setConstraints(blankLabel, gbc);
     this.bottom_WinPanel.add(blankLabel);

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_HingInstallType = new JLabel("合页安装方式");
     l_HingInstallType.setFont(new Font("Dialog", 0, 13));
     l_HingInstallType.setToolTipText("Hinge Install Type");
     gbl.setConstraints(l_HingInstallType, gbc);
     this.bottom_WinPanel.add(l_HingInstallType);
     gbc.gridwidth = 2;
     gbc.ipadx = 0;
     gbl.setConstraints(this.m_Bottom_HingeInstallType, gbc);
     this.m_Bottom_HingeInstallType.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_HingeInstallType.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_HingeInstallType);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomHingeInstallType()))
     {
       this.m_Bottom_HingeInstallType.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomHingeInstallType());
     }
     else
     {
       this.m_Bottom_HingeInstallType.setSelectedIndex(-1);
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_PanelNum = new JLabel("窗户扇数");
     l_PanelNum.setFont(new Font("Dialog", 0, 13));
     l_PanelNum.setToolTipText("Panel Number");
     gbl.setConstraints(l_PanelNum, gbc);
     this.bottom_WinPanel.add(l_PanelNum);

     gbc.gridwidth = 0;
     gbc.ipadx = 70;
     gbl.setConstraints(this.m_Bottom_PanelNum, gbc);
     this.m_Bottom_PanelNum.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_PanelNum.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_PanelNum);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomPanelNum()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomPanelNum()).intValue();
       this.m_Bottom_PanelNum.setSelectedIndex(num - 1);
     }
     else
     {
       this.m_Bottom_PanelNum.setSelectedIndex(-1);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     JLabel l_Bottom_TPolePose = new JLabel("T型立杆位置(mm)");
     l_Bottom_TPolePose.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_Bottom_TPolePose, gbc);
     this.bottom_WinPanel.add(l_Bottom_TPolePose);
     gbc.gridwidth = 2;
     gbc.ipadx = 5;
     this.txt_Bottom_TPole_Pose.setFont(new Font("Dialog", 0, 13));
     this.txt_Bottom_TPole_Pose.setEditable(false);
     this.txt_Bottom_TPole_Pose.setEnabled(false);
     gbl.setConstraints(this.txt_Bottom_TPole_Pose, gbc);
     this.bottom_WinPanel.add(this.txt_Bottom_TPole_Pose);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPolePos()))
     {
       this.txt_Bottom_TPole_Pose.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPolePos());
     }
     else
     {
       this.txt_Bottom_TPole_Pose.setText("");
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_Bottom_BendHingePanel_Num = new JLabel("弯曲合页扇数");
     l_Bottom_BendHingePanel_Num.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_Bottom_BendHingePanel_Num, gbc);
     this.bottom_WinPanel.add(l_Bottom_BendHingePanel_Num);

     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     blankLabel = new JLabel();
     this.cb_Bottom_BendHingePanel_Num.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(this.cb_Bottom_BendHingePanel_Num, gbc);
     this.bottom_WinPanel.add(this.cb_Bottom_BendHingePanel_Num);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomBendHinge()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomBendHinge()).intValue();
       this.cb_Bottom_BendHingePanel_Num.setSelectedIndex(num);
     }
     else
     {
       this.cb_Bottom_BendHingePanel_Num.setSelectedIndex(0);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_SingleHinge = new JLabel("单开合页扇数");
     l_SingleHinge.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_SingleHinge, gbc);
     this.bottom_WinPanel.add(l_SingleHinge);
     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_SingleHinge, gbc);
     this.m_Bottom_SingleHinge.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_SingleHinge.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_SingleHinge);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomSingeHinge()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomSingeHinge()).intValue();
       this.m_Bottom_SingleHinge.setSelectedIndex(num);
     }
     else
     {
       this.m_Bottom_SingleHinge.setSelectedIndex(0);
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_DoubleHinge = new JLabel("双开合页扇数");
     l_DoubleHinge.setFont(new Font("Dialog", 0, 13));
     gbl.setConstraints(l_DoubleHinge, gbc);
     this.bottom_WinPanel.add(l_DoubleHinge);
     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_DoubleHinge, gbc);
     this.m_Bottom_DoubleHinge.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_DoubleHinge.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_DoubleHinge);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDoubleHinge()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDoubleHinge()).intValue();
       this.m_Bottom_DoubleHinge.setSelectedIndex(num);
     }
     else
     {
       this.m_Bottom_DoubleHinge.setSelectedIndex(0);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_PoleNum = new JLabel("立杆数量");
     l_PoleNum.setFont(new Font("Dialog", 0, 13));
     l_PoleNum.setToolTipText("Q'ty of Stiles");
     gbl.setConstraints(l_PoleNum, gbc);
     this.bottom_WinPanel.add(l_PoleNum);
     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_PoleNum, gbc);
     this.m_Bottom_PoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_PoleNum.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_PoleNum);
     if ((CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomPoleNum())) || (CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomPoleNum().trim().equals("0")))
     {
       this.m_Bottom_PoleNum.setSelectedIndex(0);
     }
     else
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomPoleNum()).intValue();
       this.m_Bottom_PoleNum.setSelectedIndex(num - 1);
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_DuiKouPoleNum = new JLabel("对口立杆数量");
     l_DuiKouPoleNum.setFont(new Font("Dialog", 0, 13));
     l_DuiKouPoleNum.setToolTipText("Q'ty of Rabbit Stiles");
     gbl.setConstraints(l_DuiKouPoleNum, gbc);
     this.bottom_WinPanel.add(l_DuiKouPoleNum);

     gbc.gridwidth = 0;
     gbc.ipadx = 60;
     gbl.setConstraints(this.m_Bottom_DuiKouPoleNum, gbc);
     this.m_Bottom_DuiKouPoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_DuiKouPoleNum.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_DuiKouPoleNum);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDuiKouPoleNum()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDuiKouPoleNum()).intValue();
       this.m_Bottom_DuiKouPoleNum.setSelectedIndex(num);
     }
     else
     {
       this.m_Bottom_DuiKouPoleNum.setSelectedIndex(0);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_TPoleNum = new JLabel("T型立杆数量");
     l_TPoleNum.setFont(new Font("Dialog", 0, 13));
     l_TPoleNum.setToolTipText("T Pole Number");
     gbl.setConstraints(l_TPoleNum, gbc);
     this.bottom_WinPanel.add(l_TPoleNum);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_TPoleNum, gbc);
     this.m_Bottom_TPoleNum.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_TPoleNum.setEditable(true);
     this.bottom_WinPanel.add(this.m_Bottom_TPoleNum);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum()).intValue();
       this.m_Bottom_TPoleNum.setSelectedIndex(num);
     }
     else
     {
       this.m_Bottom_TPoleNum.setSelectedIndex(0);
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_ShuangLianPoleNum = new JLabel("双连立杆数");
     l_ShuangLianPoleNum.setFont(new Font("Dialog", 0, 13));
     l_ShuangLianPoleNum.setToolTipText("Shuanglian T Pole Number");
     gbl.setConstraints(l_ShuangLianPoleNum, gbc);
     this.bottom_WinPanel.add(l_ShuangLianPoleNum);

     gbc.gridwidth = 0;
     gbc.ipadx = 100;
     gbl.setConstraints(this.cb_Bottom_ShuangLianPoleNum, gbc);
     this.cb_Bottom_ShuangLianPoleNum.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.cb_Bottom_ShuangLianPoleNum);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomShuangLianPoleNum()))
     {
       int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomShuangLianPoleNum()).intValue();
       this.cb_Bottom_ShuangLianPoleNum.setSelectedIndex(num);
     }
     else
     {
       this.cb_Bottom_ShuangLianPoleNum.setSelectedIndex(0);
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_Gap = new JLabel("水平间隙(mm)");
     l_Gap.setFont(new Font("Dialog", 0, 13));
     l_Gap.setToolTipText("Horizontal Gap");
     gbl.setConstraints(l_Gap, gbc);
     this.bottom_WinPanel.add(l_Gap);

     gbc.gridwidth = 2;
     gbc.ipadx = 100;
     gbl.setConstraints(this.m_Bottom_Gap, gbc);
     this.m_Bottom_Gap.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.m_Bottom_Gap);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomGap()))
     {
       this.m_Bottom_Gap.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomGap());
     }
     else
     {
       this.m_Bottom_Gap.setText("");
     }

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_VaneType = new JLabel("叶片规格(mm)");
     l_VaneType.setFont(new Font("Dialog", 0, 13));
     l_VaneType.setToolTipText("Louver Size");
     gbl.setConstraints(l_VaneType, gbc);
     this.bottom_WinPanel.add(l_VaneType);

     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_VaneType, gbc);
     this.m_Bottom_VaneType.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.m_Bottom_VaneType);
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomVaneType()))
     {
       this.m_Bottom_VaneType.setSelectedIndex(-1);
     }
     else
     {
       this.m_Bottom_VaneType.setSelectedItem(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomVaneType());
     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_DividerType = new JLabel("分隔梁规格(mm)");
     l_DividerType.setFont(new Font("Dialog", 0, 13));
     l_DividerType.setToolTipText("Divider Size");
     gbl.setConstraints(l_DividerType, gbc);
     this.bottom_WinPanel.add(l_DividerType);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_DividerType, gbc);
     this.m_Bottom_DividerType.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_DividerType.setEnabled(false);
     if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum().equals("")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum().equals("0")) && (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomVaneType())))
     {
       String vanetype = CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomVaneType();
       this.m_Bottom_DividerType.removeAllItems();
       Vector vector = new Vector();
       int dividerArrayPos = 0;
       if (vanetype.equals(Constants.VANETYPE[3]))
       {
         dividerArrayPos = 1;
       }
       else if ((vanetype.equals(Constants.VANETYPE[0])) || (vanetype.equals(Constants.VANETYPE[3])))
       {
         dividerArrayPos = 2;
       }
       else if (vanetype.equals(Constants.VANETYPE[4]))
       {
         dividerArrayPos = 3;
       }
       this.m_Bottom_DividerType.removeAllItems();
       vector.add(Constants.DIVIDERTYPE[dividerArrayPos]);
       this.m_Bottom_DividerType.addItem(vector.elementAt(0));
       this.m_Bottom_DividerType.setSelectedIndex(0);
       this.m_Bottom_DividerType.setEnabled(true);
     }
     else
     {
       this.m_Bottom_DividerType.setEnabled(false);
       this.m_Bottom_DividerType.setSelectedIndex(-1);
     }
     this.bottom_WinPanel.add(this.m_Bottom_DividerType);

     gbc.gridwidth = -1;
     gbc.ipadx = 5;
     JLabel l_DividerNum = new JLabel("分隔梁数量");
     l_DividerNum.setFont(new Font("Dialog", 0, 13));
     l_DividerNum.setToolTipText("Divider Number for each Panel");
     gbl.setConstraints(l_DividerNum, gbc);
     this.bottom_WinPanel.add(l_DividerNum);

     gbc.gridwidth = 0;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_DividerNum, gbc);
     this.m_Bottom_DividerNum.setFont(new Font("Dialog", 0, 13));
     this.bottom_WinPanel.add(this.m_Bottom_DividerNum);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum()))
     {
       if ("0" != CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum().trim())
       {
         int num = new Integer(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum()).intValue();
         this.m_Bottom_DividerNum.setSelectedIndex(num);
       }
       else
       {
         this.m_Bottom_DividerNum.setSelectedIndex(0);
       }

     }

     gbc.gridwidth = 1;
     gbc.ipadx = 5;
     JLabel l_DividerPos = new JLabel("分隔梁位置(mm)");
     l_DividerPos.setFont(new Font("Dialog", 0, 13));
     l_DividerPos.setToolTipText("Divider Location");
     gbl.setConstraints(l_DividerPos, gbc);
     this.bottom_WinPanel.add(l_DividerPos);

     gbc.gridwidth = 2;
     gbc.ipadx = 80;
     gbl.setConstraints(this.m_Bottom_DividerPos, gbc);
     this.m_Bottom_DividerPos.setFont(new Font("Dialog", 0, 13));
     this.m_Bottom_DividerPos.setEnabled(false);
     this.m_Bottom_DividerPos.setEditable(false);
     this.bottom_WinPanel.add(this.m_Bottom_DividerPos);
     if (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerPos()))
     {
       this.m_Bottom_DividerPos.setText(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerPos());
     }
     else
     {
       this.m_Bottom_DividerPos.setText("");
     }
   }

   public void InitCommentPaneLayout()
   {
     Border border = BorderFactory.createLineBorder(Color.gray, 5);
     this.m_CommentPane.setBorder(border);
     this.m_CommentPane.setLayout(new BorderLayout());
     InitCommentsTable();
     this.m_CommentPane.add(this.m_CommentsView);
   }

   public void InitShapePicPaneLayout()
   {
     Border border = BorderFactory.createLineBorder(Color.gray, 5);
     this.m_ShapePicPane.setBorder(border);
     this.m_ShapePicPane.setLayout(new BorderLayout());

     this.m_ShapePicPane.removeAll();

     String[] tmpdetails = ((String)this.m_HingeInstallType.getSelectedItem()).split("\\:");

     if (tmpdetails == null) {
       JLabel label = new JLabel("                请选择合页及T型立杆安装方式");
       label.setFont(new Font("aaa", 1, 20));
       this.m_ShapePicPane.add(label, "Center");
       return;
     }
     String filename;
     if (tmpdetails.length == 1)
       filename = tmpdetails[0];
     else {
       filename = tmpdetails[1];
     }

     String path = Constants.SHAPE_PATH + "\\" + filename + ".bmp";
     File bmpfile = new File(path);

     if ((filename == null) || (filename.equals(""))) {
       JLabel label = new JLabel("                请选择合页及T型立杆安装方式");
       label.setFont(new Font("aaa", 1, 20));
       this.m_ShapePicPane.add(label, "Center");
       return;
     }if (!bmpfile.exists()) {
       JLabel label = new JLabel("                对不起，该款窗户尚无外形图");
       label.setFont(new Font("aaa", 1, 20));
       this.m_ShapePicPane.add(label, "Center");
       return;
     }
     Color clr = new Color(-6250272);
     JimiCanvasLW canvas = new JimiCanvasLW();
     canvas.setBackground(SystemColor.LIGHT_GRAY);
     canvas.setForeground(clr);
     canvas.setWillSizeToFit(true);
     canvas.setResizePolicy(0);
     canvas.setJustificationPolicy(8);

     Image image = Jimi.getImage(path);
     MediaTracker tracker = new MediaTracker(this);
     tracker.addImage(image, 0);
     try {
       tracker.waitForAll();
     }
     catch (InterruptedException e) {
       tracker.removeImage(image);
     }

     this.m_ShapePicPane.setName(filename + "外形预览图");
     this.m_ShapePicPane.add(canvas, "Center");

     canvas.setImage(image);
   }

   public void InitCommentsTable()
   {
     this.m_CommentsTableModel = new PVTableModel(BuildRows(), BuildCols());
     this.m_CommentsTable = new JPVTable(this.m_CommentsTableModel);
     this.m_CommentsTable.setAutoResizeMode(4);
     int[] staticlist = new int[Constants.TABLESIZE[1]];
     for (int i = 0; i < Constants.TABLESIZE[1]; i++)
     {
       staticlist[i] = i;
     }
     this.m_CommentsTable.setListOfStaticColumns(staticlist);
     this.m_CommentsView = new JPVTableView(this.m_CommentsTable);

     this.m_CommentsView.setRowHeight(25);

     this.m_CommentsView.setBorderStyle(18);
     this.m_CommentsView.setFirstColumnStyle(1);
     Color clr = new Color(-6250272);
     Border bodr = new BevelBorder(0, Color.lightGray, Color.white, Color.black, Color.gray);

     this.m_CommentsView.setBorderColor(clr);
     this.m_CommentsView.setHeaderMultiLine(1);
     this.m_CommentsView.setHeaderBackground(clr);
     this.m_CommentsView.setHeaderBorder(bodr);
     this.m_CommentsView.setHeaderBorderPressed(new BevelBorder(1, Color.lightGray, Color.white, Color.black, Color.gray));

     this.m_CommentsView.setHeaderAlignment(0);
     this.m_CommentsView.setHeaderFont(new Font("宋体", 0, 15));

     for (int i = 0; i < Constants.TABLESIZE[1]; i++) {
       this.m_CommentsView.setColumnFont(i, new Font("宋体", 0, 13));
     }

     this.m_CommentsView.setUpdateTableInRealTime(true);
     this.m_CommentsView.setGridColor(Color.darkGray);
     this.m_CommentsView.setFocusCellBorder(new LineBorder(Color.green, 2));
     this.m_CommentsView.setFocusCellForeground(new Color(-3856));
     this.m_CommentsView.setFocusCellBackground(new Color(-10460976));
     this.m_CommentsView.setSelectionForeground(new Color(-16713737));
     this.m_CommentsView.setSelectionBackground(new Color(-7302928));
     this.m_CommentsView.setEditMode(0);

     this.m_CommentsView.addEditorListener(new PVTableEditorListener()
     {
       public boolean beforeStart(ChangeEvent e)
       {
         return true;
       }
       public void started(ChangeEvent e) {
       }

       public void editingStopped(ChangeEvent e) {
         String comments = "";

         String cell_comment = "";
         for (int i = 0; i < OrderInfoRectSimpleView.this.m_CommentsTableModel.getRowCount(); i++) {
           Vector row_comment = OrderInfoRectSimpleView.this.m_CommentsTableModel.getRowData(i);
           for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++)
           {
             cell_comment = (String)row_comment.elementAt(j);
             comments = comments + cell_comment;
             comments = comments + "@@";
           }
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveComments(comments);
       }
     });
     this.m_CommentsView.addTableModelListener(new TableModelListener()
     {
       public void tableChanged(TableModelEvent e) {
         String comments = "";

         String cell_comment = "";
         for (int i = 0; i < OrderInfoRectSimpleView.this.m_CommentsTableModel.getRowCount(); i++)
         {
           Vector row_comment = OrderInfoRectSimpleView.this.m_CommentsTableModel.getRowData(i);
           if (row_comment == null)
           {
             row_comment = new Vector(Constants.TABLESIZE[1] - 1);
             for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++)
             {
               row_comment.addElement("");
             }
             OrderInfoRectSimpleView.this.m_CommentsTableModel.setRowData(row_comment, i);
           }
           for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++) {
             cell_comment = (String)row_comment.elementAt(j);
             comments = comments + cell_comment;
             comments = comments + "@@";
           }
         }
         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveComments(comments);
       }
     });
     for (int i = 1; i < Constants.TABLESIZE[1]; i++) {
       TableColumn column = this.m_CommentsTable.getColumnModel().getColumn(i);
       column.setPreferredWidth(300);
     }
     this.m_CommentsView.setEnableDeleteKey(true);
     this.m_CommentsView.setEnableInsertKey(true);
     this.m_CommentsView.setEnableSortData(false);
   }

   public void InputDividerPosDlg(boolean numchanged)
   {
     this.m_DividerPosDlg = new JDialog(CurtainDesign.m_UserMainGUI, "请输入分隔梁位置", true);

     InitDividerPosDlg(numchanged);
     this.m_DividerPosDlg.addWindowListener(new WindowListener() {
       public void windowActivated(WindowEvent e) {
       }

       public void windowClosed(WindowEvent e) {
       }

       public void windowClosing(WindowEvent e) {
         OrderInfoRectSimpleView.this.m_DividerPosDlg.dispose();
         CurtainDesign.m_UserMainGUI.show();
       }

       public void windowDeactivated(WindowEvent e)
       {
       }

       public void windowDeiconified(WindowEvent e)
       {
       }

       public void windowIconified(WindowEvent e)
       {
       }

       public void windowOpened(WindowEvent e)
       {
       }
     });
     this.m_DividerPosDlg.show();
   }

   public void InputTotalAreaDlg(boolean numchanged)
   {
     this.m_TotalAreaDlg = new JDialog(CurtainDesign.m_UserMainGUI, "请输入其它窗户尺寸", true);

     InitTotalAreaDlg(numchanged);
     this.m_TotalAreaDlg.addWindowListener(new WindowListener() {
       public void windowActivated(WindowEvent e) {
       }

       public void windowClosed(WindowEvent e) {
       }

       public void windowClosing(WindowEvent e) {
         OrderInfoRectSimpleView.this.m_TotalAreaDlg.dispose();
         CurtainDesign.m_UserMainGUI.show();
       }

       public void windowDeactivated(WindowEvent e)
       {
       }

       public void windowDeiconified(WindowEvent e)
       {
       }

       public void windowIconified(WindowEvent e)
       {
       }

       public void windowOpened(WindowEvent e)
       {
       }
     });
     this.m_TotalAreaDlg.show();
   }

   private void InitDividerPosDlg(boolean numchanged)
   {
     JPanel contentpane = (JPanel)this.m_DividerPosDlg.getContentPane();
     contentpane.setLayout(new BorderLayout());
     JPanel uppane = new JPanel();
     JPanel botpane = new JPanel();
     contentpane.add(uppane, "Center");
     contentpane.add(botpane, "South");

     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     gbc.fill = 2;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 15, 15, 15);
     uppane.setLayout(gbl);

     String str = (String)this.m_DividerNum.getSelectedItem();
     Integer Count = new Integer(str);
     int count = Count.intValue();
     JLabel[] labels = new JLabel[count];
     JTextField[] pos = new JTextField[count];
     JButton okbt = new JButton("确定");
     JButton cancelbt = new JButton("取消");
     if (numchanged) {
       CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos("");
     }
     String tmp = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDivederPos().replaceAll(" ", "");

     String[] storedpos = new String[tmp.split(",").length];
     storedpos = tmp.split(",");
     JLabel promotion = new JLabel("请从小到大，依次输入从窗户外框下端开始的分隔梁位置");
     promotion.setFont(new Font("Dialog", 0, 13));
     promotion.setForeground(Color.BLUE);
     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     gbl.setConstraints(promotion, gbc);
     uppane.add(promotion);

     for (int i = 0; i < count; i++) {
       labels[i] = new JLabel("分隔梁位置" + (i + 1) + "(mm):");
       labels[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = 1;
       gbc.ipadx = 5;
       gbc.ipady = 0;
       gbl.setConstraints(labels[i], gbc);
       uppane.add(labels[i]);
       if (numchanged) {
         pos[i] = new JTextField("");
       }
       else if (tmp.equals(""))
         pos[i] = new JTextField("");
       else {
         pos[i] = new JTextField(storedpos[i]);
       }

       pos[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = 0;
       gbc.ipadx = 150;
       gbc.ipady = 0;
       gbl.setConstraints(pos[i], gbc);
       uppane.add(pos[i]);
       pos[i].addKeyListener(new KeyListener() {
         Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

         public void keyTyped(KeyEvent e) {
         }

         public void keyReleased(KeyEvent e) {
           JTextField txt = (JTextField)(JTextField)e.getSource();
           String str = txt.getText();
           Matcher m = this.numpattern.matcher(str);
           if (!m.matches()) {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             e.consume();
             JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

             str = str.substring(0, str.length() - 1);
             txt.setText(str);
           }
         }

         public void keyPressed(KeyEvent e) {
         }
       });
     }

	   CurtainDesign.count = count;
	   CurtainDesign.pos = pos;

     botpane.setLayout(new FlowLayout());
     okbt.setFont(new Font("Dialog", 0, 13));
     cancelbt.setFont(new Font("Dialog", 0, 13));
     botpane.add(okbt);
     botpane.add(cancelbt);

     Dimension outframesize = CurtainDesign.m_UserMainGUI.getSize();
     Dimension size = new Dimension();
     size = this.m_DividerPosDlg.getPreferredSize();
     this.m_DividerPosDlg.setSize(size);
     int x0 = CurtainDesign.m_UserMainGUI.getX();
     int y0 = CurtainDesign.m_UserMainGUI.getY();
     this.m_DividerPosDlg.setLocation(x0 + (outframesize.width - size.width) / 2, y0 + (outframesize.height - size.height) / 2);


     okbt.addActionListener(new ActionListener() {
     	private final int val$count = CurtainDesign.count;
       private final JTextField[] val$pos = CurtainDesign.pos;

       public void actionPerformed(ActionEvent ae) {
		   String posstr = "";
         for (int i = 0; i < this.val$count; i++) {
           if (this.val$pos[i].getText().toString().equals("")) {
             JOptionPane.showMessageDialog(null, "分隔梁位置不能为空！", "错误", 0);

             return;
           }if (i < this.val$count - 1)
             posstr = posstr + this.val$pos[i].getText() + ",   ";
           else {
             posstr = posstr + this.val$pos[i].getText();
           }
         }
         Float[] tmpInt = new Float[this.val$count];
         for (int i = 0; i < this.val$count; i++) {
           tmpInt[i] = new Float(this.val$pos[i].getText());
         }
         for (int i = 0; i < this.val$count - 1; i++) {
           if (tmpInt[i].compareTo(tmpInt[(i + 1)]) >= 0) {
             JOptionPane.showMessageDialog(null, "第" + (i + 1) + "个分隔梁位置必须小于第" + (i + 2) + "个分隔梁位置，请重新输入", "错误", 0);

             return;
           }
         }

         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveDividerPos(posstr);

         OrderInfoRectSimpleView.this.m_DividerPos.setText(posstr);
         OrderInfoRectSimpleView.this.m_DividerPos.setEnabled(true);
         OrderInfoRectSimpleView.this.m_DividerPos.setEditable(false);
         OrderInfoRectSimpleView.this.m_DividerPosDlg.dispose();
         CurtainDesign.m_UserMainGUI.show();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
     cancelbt.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent ae) {
         OrderInfoRectSimpleView.this.m_DividerPosDlg.dispose();
         CurtainDesign.m_UserMainGUI.show();
         OrderInfoRectSimpleView.this.CheckCalcBt();
       }
     });
   }

   // 校验信息是否完整
   public boolean IsInfoComplete()
   {
   	// 合页安装方式
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetHingeInstallType()))
     {
       return false;
     }
     // 订单编号
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOrderIndex()))
     {
       return false;
     }
     // 客户名称
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetClientRegion()))
     {
       return false;
     }
     // 房间
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetRoom()))
     {
       return false;
     }
     // 下单日期
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOrderDate() == null)
     {
       return false;
     }
     // 流水号
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPipeIndex()))
     {
       return false;
     }
     // 窗户总数
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWindowNum()))
     {
       return false;
     }
     // 窗户编号
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWindowIndex()))
     {
       return false;
     }
     // 木材
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetWoodOption() == -1)
     {
       return false;
     }
     // 颜色
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetColor()))
     {
       return false;
     }
     // 原始窗宽 todo 计算
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOriWindowWidth()))
     {
       return false;
     }
     // 原始窗高 todo 计算
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOriWindowHeight()))
     {
       return false;
     }
     // 安装方式
     if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetInstall()))
     {
       return false;
     }
     // 合页颜色
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetHingeColor() == -1)
     {
       return false;
     }
     // 外框数量和位置
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameNumPos() == -1)
     {
       return false;
     }
     // 外框类型
     if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameType() == -1) && (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetFrameNumPos() != 2))
     {
       return false;
     }
     // 拉杆类型
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetPullBarType() == -1)
     {
     	// 一层 部位实木
       if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("1")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard()))
       {
         return false;
       }
       // 两层 并且 （实木 || 下层实木）
       if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard()) || (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard())))
       {
         return false;
       }
     } else { // 存在拉杆类型
     	// T型立杆类型
       if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getTPoleType()))
       {
         return false;
       }
       // 两层 && （不等高 &&  分隔线高度为空）
       if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2")) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getSameHeight()) && (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getHtPolePos())))
       {
         return false;
       }
       // 扇等宽 && T型立杆数量 不为空 && T型立杆数量大于0 && T型立杆位置为空
       if ((!CurtainDesign.m_UserMainGUI.GetOrderInfo().getSamePanelWidth()) && (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum())) && (Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPoleNum()) > 0) && (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetTPolePos())))
       {
         return false;
       }
       // 间隙为空
       if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetGap()))
       {
         return false;
       }
       // 不为实木
       if (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getIsBoard())
       {
       	// 叶片规格为空
         if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetVaneType() == -1)
         {
           return false;
         }
         // 分隔梁数量 大于 0 && 分隔梁位置
         if ((Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDividerNum()) > 0) && (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().GetDivederPos())))
         {
           return false;
         }
       }
     }
     // 两层的情况
     if (CurtainDesign.m_UserMainGUI.GetOrderInfo().GetLevel().trim().equals("2"))
     {
     	// 下层合页安装方式 为空
       if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomHingeInstallType()))
       {
         return false;
       }
       // 有横T &&
       if ((CurtainDesign.m_UserMainGUI.GetOrderInfo().getHTPoleExist()) && (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomSameWidth()) && (!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum())) && (Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPoleNum()) > 0) && (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomTPolePos())))
       {
         return false;
       }
       // 底层空隙
       if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomGap()))
       {
         return false;
       }
       if (!CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomIsBoard())
       {
         if (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomVaneType()))
         {
           return false;
         }
         if ((!CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum())) && (Integer.parseInt(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerNum()) > 0) && (CurtainChecker.isEmpty(CurtainDesign.m_UserMainGUI.GetOrderInfo().getBottomDividerPos())))
         {
           return false;
         }
       }
     }
     return true;
   }

   public void CheckCalcBt() {
     if (IsInfoComplete())
       CurtainDesign.m_UserMainGUI.EnableCalcBt();
     else
       CurtainDesign.m_UserMainGUI.DisableCalcBt();
   }

   private Vector BuildCols()
   {
     Vector cols = new Vector(Constants.TABLESIZE[1]);
     cols.addElement("编号");
     for (int i = 1; i < Constants.TABLESIZE[1]; i++) {
       cols.addElement("注释" + i);
     }
     return cols;
   }

   private Vector BuildRows() {
     Vector data = new Vector();

     String comments = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetComments();
     if (CurtainChecker.isEmpty(comments))
     {
       for (int i = 0; i < Constants.TABLESIZE[0]; i++) {
         Vector row = new Vector(Constants.TABLESIZE[1] - 1);
         for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++)
         {
           row.addElement("");
         }
         data.addElement(row);
       }

     }
     else
     {
       String strComments = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetComments();
       String[] commentArray = strComments.split("@@");
		 int rowNum = commentArray.length % (Constants.TABLESIZE[1] - 1) == 0 ? commentArray.length / (Constants.TABLESIZE[1] - 1) : commentArray.length / (Constants.TABLESIZE[1] - 1) + 1;

       for (int i = 0; i < rowNum; i++)
       {
         String[] cell_comments = new String[Constants.TABLESIZE[1] - 1];
         for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++) {
           cell_comments[j] = "";
         }

         for (int j = 0; j < Constants.TABLESIZE[1] - 1; j++)
         {
           if (i * (Constants.TABLESIZE[1] - 1) + j >= commentArray.length)
             continue;
           cell_comments[j] = commentArray[(i * (Constants.TABLESIZE[1] - 1) + j)];
         }

         Vector row_vector = null;
         row_vector = new Vector();
         for (int j = 0; j < cell_comments.length; j++)
         {
           row_vector.addElement(cell_comments[j]);
         }
         data.addElement(row_vector);
       }
     }

     return data;
   }

   private void InitTotalAreaDlg(boolean numchanged)
   {
     JPanel contentpane = (JPanel)this.m_TotalAreaDlg.getContentPane();
     contentpane.setLayout(new BorderLayout());
     JPanel uppane = new JPanel();
     JPanel botpane = new JPanel();
     contentpane.add(uppane, "Center");
     contentpane.add(botpane, "South");

     GridBagLayout gbl = new GridBagLayout();
     GridBagConstraints gbc = new GridBagConstraints();
     gbc.fill = 2;
     gbc.anchor = 13;
     gbc.insets = new Insets(15, 15, 15, 15);
     uppane.setLayout(gbl);

     String str = (String)this.m_WindowNum.getSelectedItem();
     Integer Count = new Integer(str);
     int count = Count.intValue();
     JLabel[] widthlabels = new JLabel[count - 1];
     JLabel[] heightlabels = new JLabel[count - 1];
     JTextField[] width = new JTextField[count - 1];
     JTextField[] height = new JTextField[count - 1];
     JButton okbt = new JButton("确定");
     JButton cancelbt = new JButton("取消");

     String tmpwidth = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOtherWidth();

     String tmpheight = CurtainDesign.m_UserMainGUI.GetOrderInfo().GetOtherHeight();

     String[] storedwidth = new String[tmpheight.split(",").length];
     storedwidth = tmpwidth.split(",");
     String[] storedheight = new String[tmpheight.split(",").length];
     storedheight = tmpheight.split(",");

     JLabel promotion = new JLabel("请输入该订单中其它窗户的尺寸");
     promotion.setFont(new Font("Dialog", 0, 13));
     promotion.setForeground(Color.BLUE);
     gbc.gridwidth = 0;
     gbc.ipadx = 5;
     gbc.ipady = 5;
     gbl.setConstraints(promotion, gbc);
     uppane.add(promotion);

     for (int i = 0; i < count - 1; i++) {
       if (numchanged) {
         width[i] = new JTextField("");
         height[i] = new JTextField("");
       } else {
         if (tmpwidth.equals(""))
           width[i] = new JTextField("");
         else {
           width[i] = new JTextField(storedwidth[i]);
         }
         if (tmpheight.equals(""))
           height[i] = new JTextField("");
         else {
           height[i] = new JTextField(storedheight[i]);
         }
       }
       widthlabels[i] = new JLabel("其它窗户宽度" + (i + 1));
       widthlabels[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = 1;
       gbc.ipadx = 5;
       gbc.ipady = 0;
       gbl.setConstraints(widthlabels[i], gbc);
       uppane.add(widthlabels[i]);

       width[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = 2;
       gbc.ipadx = 80;
       gbc.ipady = 0;
       gbl.setConstraints(width[i], gbc);
       uppane.add(width[i]);
       width[i].addKeyListener(new KeyListener() {
         Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

         public void keyTyped(KeyEvent e) {
         }

         public void keyReleased(KeyEvent e) {
           JTextField txt = (JTextField)(JTextField)e.getSource();
           String str = txt.getText();
           Matcher m = this.numpattern.matcher(str);
           if (!m.matches()) {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             e.consume();
             JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

             str = str.substring(0, str.length() - 1);
             txt.setText(str);
           }
         }

         public void keyPressed(KeyEvent e)
         {
         }
       });
       heightlabels[i] = new JLabel("其它窗户高度" + (i + 1));
       heightlabels[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = -1;
       gbc.ipadx = 5;
       gbc.ipady = 0;
       gbl.setConstraints(heightlabels[i], gbc);
       uppane.add(heightlabels[i]);

       height[i].setFont(new Font("Dialog", 0, 13));
       gbc.gridwidth = 0;
       gbc.ipadx = 80;
       gbc.ipady = 0;
       gbl.setConstraints(height[i], gbc);
       uppane.add(height[i]);
       height[i].addKeyListener(new KeyListener() {
         Pattern numpattern = Pattern.compile("([0-9]*)(\\.)?([0-9]*)");

         public void keyTyped(KeyEvent e) {
         }

         public void keyReleased(KeyEvent e) {
           JTextField txt = (JTextField)(JTextField)e.getSource();
           String str = txt.getText();
           Matcher m = this.numpattern.matcher(str);
           if (!m.matches()) {
             OrderInfoRectSimpleView.this.getToolkit().beep();
             e.consume();
             JOptionPane.showMessageDialog(null, "请仅输入数字", "错误", 0);

             str = str.substring(0, str.length() - 1);
             txt.setText(str);
           }
         }

         public void keyPressed(KeyEvent e) {
         } } );
     }
     botpane.setLayout(new FlowLayout());
     okbt.setFont(new Font("Dialog", 0, 13));
     cancelbt.setFont(new Font("Dialog", 0, 13));
     botpane.add(okbt);
     botpane.add(cancelbt);

     Dimension outframesize = CurtainDesign.m_UserMainGUI.getSize();
     Dimension size = new Dimension();
     size = this.m_TotalAreaDlg.getPreferredSize();
     this.m_TotalAreaDlg.setSize(size);
     int x0 = CurtainDesign.m_UserMainGUI.getX();
     int y0 = CurtainDesign.m_UserMainGUI.getY();
	   this.m_DividerPosDlg.setLocation(x0 + (outframesize.width - size.width) / 2, y0 + (outframesize.height - size.height) / 2);

//     okbt.addActionListener(new ActionListener(count, width, height) { private final int val$count;
//       private final JTextField[] val$height;
//       private final JTextField[] val$width;
//
//       public void actionPerformed(ActionEvent ae) { String widthstr = "";
//         String heightstr = "";
//         for (int i = 0; i < this.val$count - 1; i++) {
//           if (this.val$width[i].getText().toString().equals("")) {
//             JOptionPane.showMessageDialog(null, "窗户宽度不能为空！", "错误", 0);
//
//             return;
//           }if (this.val$height[i].getText().toString().equals("")) {
//             JOptionPane.showMessageDialog(null, "窗户高度不能为空！", "错误", 0);
//
//             return;
//           }if (i < this.val$count - 2) {
//             widthstr = widthstr + this.val$width[i].getText() + ",";
//             heightstr = heightstr + this.val$height[i].getText() + ",";
//           } else {
//             widthstr = widthstr + this.val$width[i].getText();
//             heightstr = heightstr + this.val$height[i].getText();
//           }
//         }
//
//         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOtherWidth(widthstr);
//
//         CurtainDesign.m_UserMainGUI.GetOrderInfo().SaveOtherHeight(heightstr);
//
//         OrderInfoRectSimpleView.this.m_TotalAreaDlg.dispose();
//         CurtainDesign.m_UserMainGUI.show();
//       }
//     });
     cancelbt.addActionListener(new ActionListener()
     {
       public void actionPerformed(ActionEvent ae)
       {
         OrderInfoRectSimpleView.this.m_TotalAreaDlg.dispose();
         CurtainDesign.m_UserMainGUI.show();
       }
     });
   }
 }

/* Location:           C:\Users\Administrator\Desktop\奥特百叶窗\Shutter DesignerV3.1\CurtainDesign.jar
 * Qualified Name:     CurtainDesign.OrderInfoRectSimpleView
 * JD-Core Version:    0.6.0
 */